Files
wasmtime/.github/workflows/publish-to-cratesio.yml
Alex Crichton 99e9e1395d Update more workflows to only this repository (#4062)
* Update more workflows to only this repository

This adds `if: github.repository == 'bytecodealliance/wasmtime'` to a
few more workflows related to the release process which should only run
in this repository and no other (e.g. forks).

* Also only run verify-publish in the upstream repo

No need for local deelopment to be burdened with ensuring everything is
actually publish-able, that's just a concern for the main repository.

* Gate workflows which need secrets on this repository
2022-04-21 11:45:48 -05:00

26 lines
647 B
YAML

# The purpose of this workflow is to publish the wasmtime workspace of crates
# whenever a wasmtime tag is created. This baiscally boils down to running
# `scripts/publish.rs` at the right time.
name: "Publish to crates.io"
on:
push:
tags:
- 'v*'
jobs:
publish:
if: github.repository == 'bytecodealliance/wasmtime'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: rustup update stable && rustup default stable
- run: |
rustc scripts/publish.rs
./publish publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}