Verify crates are publish-able on CI (#2036)
This commit updates our CI to verify that all crates are publish-able at all times on every commit. During the 0.19.0 release we found another case where the crates as they live in this repository weren't publish-able, so the hope is that this no longer comes up again! The script added in this commit also takes the time/liberty to remove the existing bump/publish scripts and instead replace them with one Rust script originally sourced from wasm-bindgen. The intention of this script is that it has three modes: * `./publish bump` - bumps version numbers which are sent as a PR to get reviewed (probably with a changelog as well) * `./publish verify` - run on CI on every commit, builds every crate we publish as if it's being published to crates.io, notably without raw access to other crates in the repository. * `./publish publish` - publishes all crates to crates.io, passing the `--no-verify` flag to make this a much speedier process than it is today.
This commit is contained in:
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@@ -558,3 +558,19 @@ jobs:
|
||||
- run: |
|
||||
cargo install --root ${{ runner.tool_cache }}/cargo-audit --version ${{ env.CARGO_AUDIT_VERSION }} cargo-audit
|
||||
cargo audit
|
||||
|
||||
verify-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- run: rustup update stable && rustup default stable
|
||||
- run: |
|
||||
cd ${{ runner.tool_cache }}
|
||||
curl -L https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz | tar xzf -
|
||||
echo "::add-path::`pwd`/sccache-0.2.13-x86_64-unknown-linux-musl"
|
||||
echo ::set-env name=RUSTC_WRAPPER::sccache
|
||||
- run: |
|
||||
rustc scripts/publish.rs
|
||||
./publish verify
|
||||
|
||||
Reference in New Issue
Block a user