From 9f71f648aab135677e9444f20f1e3a95020799fc Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Fri, 26 Jan 2024 09:09:15 -0800 Subject: [PATCH] Regenerate cargo-dist --- .github/workflows/release.yml | 47 ++++++++++------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 678963a0..239db49b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ permissions: on: push: tags: - - "**[0-9]+.[0-9]+.[0-9]+*" + - '**[0-9]+.[0-9]+.[0-9]+*' pull_request: jobs: @@ -50,9 +50,7 @@ jobs: outputs: val: ${{ steps.plan.outputs.manifest }} tag: ${{ !github.event.pull_request && github.ref_name || '' }} - tag-flag: - ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) - || '' }} + tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} publishing: ${{ !github.event.pull_request }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -64,10 +62,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: - "curl --proto '=https' --tlsv1.2 -LsSf - https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh - | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh" # sure would be cool if github gave us proper conditionals... # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible # functionality based on whether this is a pull_request, and whether it's from a fork. @@ -91,10 +86,7 @@ jobs: # Let the initial task tell us to not run (currently very blunt) needs: - plan - 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') }} + 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') }} strategy: fail-fast: false # Target platforms/runners are computed by cargo-dist in create-release. @@ -111,8 +103,7 @@ jobs: runs-on: ${{ matrix.runner }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILD_MANIFEST_NAME: - target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json + BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json steps: - uses: actions/checkout@v4 with: @@ -122,7 +113,7 @@ jobs: run: ${{ matrix.install_dist }} # Get the dist-manifest - name: Fetch local artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: artifacts path: target/distrib/ @@ -169,13 +160,10 @@ jobs: with: submodules: recursive - name: Install cargo-dist - run: - "curl --proto '=https' --tlsv1.2 -LsSf - https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh - | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh" # Get all the local artifacts for the global tasks to use (for e.g. checksums) - name: Fetch local artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: artifacts path: target/distrib/ @@ -205,12 +193,7 @@ jobs: - build-local-artifacts - build-global-artifacts # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) - 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') }} + 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') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: "ubuntu-20.04" @@ -221,13 +204,10 @@ jobs: with: submodules: recursive - name: Install cargo-dist - run: - "curl --proto '=https' --tlsv1.2 -LsSf - https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh - | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh" # Fetch artifacts from scratch-storage - name: Fetch artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: artifacts path: target/distrib/ @@ -262,7 +242,7 @@ jobs: with: submodules: recursive - name: "Download Github Artifacts" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: artifacts path: artifacts @@ -276,6 +256,5 @@ jobs: tag: ${{ needs.plan.outputs.tag }} name: ${{ fromJson(needs.host.outputs.val).announcement_title }} body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }} - prerelease: - ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }} + prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }} artifacts: "artifacts/*"