1515
1616name : Release
1717permissions :
18- " attestations " : " write"
1918 " contents " : " write"
20- " id-token " : " write"
2119
2220# This task will run whenever you push a git tag that looks like a version
2321# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
6664 # we specify bash to get pipefail; it guards against the `curl` command
6765 # failing. otherwise `sh` won't catch that `curl` returned non-0
6866 shell : bash
69- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.0 /cargo-dist-installer.sh | sh"
67+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3 /cargo-dist-installer.sh | sh"
7068 - name : Cache dist
7169 uses : actions/upload-artifact@v4
7270 with :
@@ -114,6 +112,10 @@ jobs:
114112 env :
115113 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
116114 BUILD_MANIFEST_NAME : target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
115+ permissions :
116+ " attestations " : " write"
117+ " contents " : " read"
118+ " id-token " : " write"
117119 steps :
118120 - name : enable windows longpaths
119121 run : |
@@ -129,6 +131,10 @@ jobs:
129131 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
130132 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
131133 fi
134+ - uses : swatinem/rust-cache@v2
135+ with :
136+ key : ${{ join(matrix.targets, '-') }}
137+ cache-provider : ${{ matrix.cache_provider }}
132138 - name : Install dist
133139 run : ${{ matrix.install_dist.run }}
134140 # Get the dist-manifest
@@ -242,8 +248,8 @@ jobs:
242248 - plan
243249 - build-local-artifacts
244250 - build-global-artifacts
245- # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine)
246- if : ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
251+ # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
252+ if : ${{ always() && needs.plan.result == 'success' && needs.plan. outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
247253 env :
248254 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
249255 runs-on : " ubuntu-22.04"
0 commit comments