4848 push :
4949 tags :
5050 # Only release for the CLI crate
51- - " v[0-9]+.[0-9]+.[0-9]+*"
51+ - ' v[0-9]+.[0-9]+.[0-9]+*'
5252
5353jobs :
5454 # Run 'dist plan' (or host) to determine what tasks we need to do
5555 plan :
56- runs-on : " ubuntu-22.04"
56+ runs-on : ' ubuntu-22.04'
5757 outputs :
5858 val : ${{ steps.plan.outputs.manifest }}
5959 tag : ${{ !github.event.pull_request && github.ref_name || '' }}
7070 # we specify bash to get pipefail; it guards against the `curl` command
7171 # failing. otherwise `sh` won't catch that `curl` returned non-0
7272 shell : bash
73- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh | sh"
73+ run : " curl --proto '=https' --tlsv1.2 -LsSf
74+ https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh
75+ | sh"
7476 - name : Cache dist
7577 uses : actions/upload-artifact@v6
7678 with :
8789 echo "dist ran successfully"
8890 cat plan-dist-manifest.json
8991 echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
90- - name : " Upload dist-manifest.json"
92+ - name : ' Upload dist-manifest.json'
9193 uses : actions/upload-artifact@v6
9294 with :
9395 name : artifacts-plan-dist-manifest
99101 # Let the initial task tell us to not run (currently very blunt)
100102 needs :
101103 - plan
102- if : ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
104+ if : ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null &&
105+ (needs.plan.outputs.publishing == 'true' ||
106+ fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
103107 strategy :
104108 fail-fast : false
105109 # Target platforms/runners are computed by dist in create-release.
@@ -170,7 +174,7 @@ jobs:
170174 echo "EOF" >> "$GITHUB_OUTPUT"
171175
172176 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
173- - name : " Upload artifacts"
177+ - name : ' Upload artifacts'
174178 uses : actions/upload-artifact@v6
175179 with :
176180 name : artifacts-build-local-${{ join(matrix.targets, '_') }}
@@ -183,7 +187,7 @@ jobs:
183187 needs :
184188 - plan
185189 - build-local-artifacts
186- runs-on : " ubuntu-22.04"
190+ runs-on : ' ubuntu-22.04'
187191 env :
188192 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
189193 BUILD_MANIFEST_NAME : target/distrib/global-dist-manifest.json
@@ -217,7 +221,7 @@ jobs:
217221 echo "EOF" >> "$GITHUB_OUTPUT"
218222
219223 cp dist-manifest.json "$BUILD_MANIFEST_NAME"
220- - name : " Upload artifacts"
224+ - name : ' Upload artifacts'
221225 uses : actions/upload-artifact@v6
222226 with :
223227 name : artifacts-build-global
@@ -231,12 +235,15 @@ jobs:
231235 - build-local-artifacts
232236 - build-global-artifacts
233237 # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
234- 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') }}
238+ if : ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' &&
239+ (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result ==
240+ ' success' ) && (needs.build-local-artifacts.result == 'skipped' ||
241+ needs.build-local-artifacts.result == 'success') }}
235242 env :
236243 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
237244 permissions :
238245 contents : write # For GitHub releases
239- runs-on : " ubuntu-22.04"
246+ runs-on : ' ubuntu-22.04'
240247 outputs :
241248 val : ${{ steps.host.outputs.manifest }}
242249 steps :
@@ -264,14 +271,14 @@ jobs:
264271 echo "artifacts uploaded and released successfully"
265272 cat dist-manifest.json
266273 echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
267- - name : " Upload dist-manifest.json"
274+ - name : ' Upload dist-manifest.json'
268275 uses : actions/upload-artifact@v6
269276 with :
270277 # Overwrite the previous copy
271278 name : artifacts-dist-manifest
272279 path : dist-manifest.json
273280 # Create a GitHub Release while uploading all files to it
274- - name : " Download GitHub Artifacts"
281+ - name : ' Download GitHub Artifacts'
275282 uses : actions/download-artifact@v7
276283 with :
277284 pattern : artifacts-*
@@ -283,10 +290,12 @@ jobs:
283290 rm -f artifacts/*-dist-manifest.json
284291 - name : Create GitHub Release
285292 env :
286- PRERELEASE_FLAG : " ${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
287- ANNOUNCEMENT_TITLE : " ${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
288- ANNOUNCEMENT_BODY : " ${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
289- RELEASE_COMMIT : " ${{ github.sha }}"
293+ PRERELEASE_FLAG :
294+ " ${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease'
295+ || '' }}"
296+ ANNOUNCEMENT_TITLE : ' ${{ fromJson(steps.host.outputs.manifest).announcement_title }}'
297+ ANNOUNCEMENT_BODY : ' ${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}'
298+ RELEASE_COMMIT : ' ${{ github.sha }}'
290299 run : |
291300 # Write and read notes from a file to avoid quoting breaking things
292301 echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
@@ -315,8 +324,9 @@ jobs:
315324 # use "always() && ..." to allow us to wait for all publish jobs while
316325 # still allowing individual publish jobs to skip themselves (for prereleases).
317326 # "host" however must run to completion, no skipping allowed!
318- if : ${{ always() && needs.host.result == 'success' && (needs.custom-release-npm.result == 'skipped' || needs.custom-release-npm.result == 'success') }}
319- runs-on : " ubuntu-22.04"
327+ if : ${{ always() && needs.host.result == 'success' && (needs.custom-release-npm.result ==
328+ ' skipped' || needs.custom-release-npm.result == 'success') }}
329+ runs-on : ' ubuntu-22.04'
320330 env :
321331 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
322332 steps :
0 commit comments