Fix release-cli.yml: Do not dry run cargo-publish (#1487)

* Fix `release-cli.yml`: Do not dry run `cargo-publish`

If dependencies of `carog-binstall` is bumped, then `cargo-publish` dry
run will fail since the dependency has not published yet

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Speedup step publish in `release-cli.yml`

Use `just-setup` to cache rust/zig compilation, also
disable all features to reduce dependencies pulled in.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* `release-cli.yml`: Restore rust cache before ephermal-crate.sh is run

which writes the key to `Cargo.toml` and invalidates the cache.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-11-11 21:11:09 +10:00 committed by GitHub
parent 86237aa611
commit 26b6db2244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,6 +82,9 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: minisign.pub
- uses: ./.github/actions/just-setup
- run: .github/scripts/ephemeral-crate.sh
- if: fromJSON(inputs.info).is-release != 'true'
@ -89,10 +92,7 @@ jobs:
env:
crate: ${{ fromJSON(inputs.info).crate }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
set -ex
cargo publish -p "$crate" --allow-dirty --dry-run
cargo package --no-verify -p "$crate" --allow-dirty
run: cargo package -p "$crate" --allow-dirty --no-default-features
- if: fromJSON(inputs.info).is-release != 'true'
name: Upload crate package as artifact
uses: actions/upload-artifact@v3
@ -105,7 +105,7 @@ jobs:
env:
crate: ${{ fromJSON(inputs.info).crate }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p "$crate" --allow-dirty
run: cargo publish -p "$crate" --allow-dirty --no-default-features
- if: fromJSON(inputs.info).is-release == 'true'
name: Make release latest