Skip to content

Commit 6a2a6c8

Browse files
Update cargo dist
1 parent 15d9954 commit 6a2a6c8

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ jobs:
6262
# we specify bash to get pipefail; it guards against the `curl` command
6363
# failing. otherwise `sh` won't catch that `curl` returned non-0
6464
shell: bash
65-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh"
65+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.10.0/cargo-dist-installer.sh | sh"
6666
# sure would be cool if github gave us proper conditionals...
6767
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
6868
# functionality based on whether this is a pull_request, and whether it's from a fork.
6969
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
7070
# but also really annoying to build CI around when it needs secrets to work right.)
7171
- id: plan
7272
run: |
73-
cargo dist ${{ !github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name) || (github.event.pull_request.head.repo.fork && 'plan' || 'host --steps=check') }} --output-format=json > dist-manifest.json
73+
cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
7474
echo "cargo dist ran successfully"
75-
cat dist-manifest.json
76-
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
75+
cat plan-dist-manifest.json
76+
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
7777
- name: "Upload dist-manifest.json"
7878
uses: actions/upload-artifact@v4
7979
with:
80-
name: artifacts
81-
path: dist-manifest.json
80+
name: artifacts-plan-dist-manifest
81+
path: plan-dist-manifest.json
8282

8383
# Build and packages all the platform-specific things
8484
build-local-artifacts:
@@ -118,8 +118,9 @@ jobs:
118118
- name: Fetch local artifacts
119119
uses: actions/download-artifact@v4
120120
with:
121-
name: artifacts
121+
pattern: artifacts-*
122122
path: target/distrib/
123+
merge-multiple: true
123124
- name: Install dependencies
124125
run: |
125126
${{ matrix.packages_install }}
@@ -144,7 +145,7 @@ jobs:
144145
- name: "Upload artifacts"
145146
uses: actions/upload-artifact@v4
146147
with:
147-
name: artifacts
148+
name: artifacts-build-local-${{ join(matrix.targets, '_') }}
148149
path: |
149150
${{ steps.cargo-dist.outputs.paths }}
150151
${{ env.BUILD_MANIFEST_NAME }}
@@ -163,13 +164,14 @@ jobs:
163164
with:
164165
submodules: recursive
165166
- name: Install cargo-dist
166-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh"
167+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.10.0/cargo-dist-installer.sh | sh"
167168
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
168169
- name: Fetch local artifacts
169170
uses: actions/download-artifact@v4
170171
with:
171-
name: artifacts
172+
pattern: artifacts-*
172173
path: target/distrib/
174+
merge-multiple: true
173175
- id: cargo-dist
174176
shell: bash
175177
run: |
@@ -185,7 +187,7 @@ jobs:
185187
- name: "Upload artifacts"
186188
uses: actions/upload-artifact@v4
187189
with:
188-
name: artifacts
190+
name: artifacts-build-global
189191
path: |
190192
${{ steps.cargo-dist.outputs.paths }}
191193
${{ env.BUILD_MANIFEST_NAME }}
@@ -207,13 +209,14 @@ jobs:
207209
with:
208210
submodules: recursive
209211
- name: Install cargo-dist
210-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.8.0/cargo-dist-installer.sh | sh"
212+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.10.0/cargo-dist-installer.sh | sh"
211213
# Fetch artifacts from scratch-storage
212214
- name: Fetch artifacts
213215
uses: actions/download-artifact@v4
214216
with:
215-
name: artifacts
217+
pattern: artifacts-*
216218
path: target/distrib/
219+
merge-multiple: true
217220
# This is a harmless no-op for Github Releases, hosting for that happens in "announce"
218221
- id: host
219222
shell: bash
@@ -225,7 +228,8 @@ jobs:
225228
- name: "Upload dist-manifest.json"
226229
uses: actions/upload-artifact@v4
227230
with:
228-
name: artifacts
231+
# Overwrite the previous copy
232+
name: artifacts-dist-manifest
229233
path: dist-manifest.json
230234

231235
# Create a Github Release while uploading all files to it
@@ -247,8 +251,9 @@ jobs:
247251
- name: "Download Github Artifacts"
248252
uses: actions/download-artifact@v4
249253
with:
250-
name: artifacts
254+
pattern: artifacts-*
251255
path: artifacts
256+
merge-multiple: true
252257
- name: Cleanup
253258
run: |
254259
# Remove the granular manifests

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lto = "thin"
6565
# Config for 'cargo dist'
6666
[workspace.metadata.dist]
6767
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
68-
cargo-dist-version = "0.8.0"
68+
cargo-dist-version = "0.10.0"
6969
# CI backends to support
7070
ci = ["github"]
7171
# The installers to generate for each app

0 commit comments

Comments
 (0)