From 26b6db2244dce2b044547d8602db66bf26660519 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sat, 11 Nov 2023 21:11:09 +1000 Subject: [PATCH] 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 * 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 * `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 --------- Signed-off-by: Jiahao XU --- .github/workflows/release-cli.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 4aaf0322..80b94fda 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -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