Skip to content

Commit

Permalink
Regenerate cargo-dist
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Jan 26, 2024
1 parent 4b8b6e1 commit 9f71f64
Showing 1 changed file with 13 additions and 34 deletions.
47 changes: 13 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ permissions:
on:
push:
tags:
- "**[0-9]+.[0-9]+.[0-9]+*"
- '**[0-9]+.[0-9]+.[0-9]+*'
pull_request:

jobs:
Expand All @@ -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 }}
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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:
Expand All @@ -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/
Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -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"
Expand All @@ -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/
Expand Down Expand Up @@ -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
Expand All @@ -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/*"

0 comments on commit 9f71f64

Please sign in to comment.