@@ -60,29 +60,27 @@ jobs:
60
60
- uses : actions/checkout@v4
61
61
with :
62
62
submodules : recursive
63
- - name : Install Rust
64
- run : rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
65
63
- name : Install cargo-dist
66
64
# we specify bash to get pipefail; it guards against the `curl` command
67
65
# failing. otherwise `sh` won't catch that `curl` returned non-0
68
66
shell : bash
69
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.7.2 /cargo-dist-installer.sh | sh"
67
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.11.1 /cargo-dist-installer.sh | sh"
70
68
# sure would be cool if github gave us proper conditionals...
71
69
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
72
70
# functionality based on whether this is a pull_request, and whether it's from a fork.
73
71
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
74
72
# but also really annoying to build CI around when it needs secrets to work right.)
75
73
- id : plan
76
74
run : |
77
- 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
75
+ cargo dist ${{ ( !github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || (env.AXO_RELEASES_TOKEN && 'host --steps=check') || 'plan' }} --output-format=json > plan- dist-manifest.json
78
76
echo "cargo dist ran successfully"
79
- cat dist-manifest.json
80
- echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
77
+ cat plan- dist-manifest.json
78
+ echo "manifest=$(jq -c "." plan- dist-manifest.json)" >> "$GITHUB_OUTPUT"
81
79
- name : " Upload dist-manifest.json"
82
- uses : actions/upload-artifact@v3
80
+ uses : actions/upload-artifact@v4
83
81
with :
84
- name : artifacts
85
- path : dist-manifest.json
82
+ name : artifacts-plan-dist-manifest
83
+ path : plan- dist-manifest.json
86
84
87
85
# Build and packages all the platform-specific things
88
86
build-local-artifacts :
@@ -112,17 +110,16 @@ jobs:
112
110
- uses : actions/checkout@v4
113
111
with :
114
112
submodules : recursive
115
- - name : Install Rust
116
- run : rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
117
113
- uses : swatinem/rust-cache@v2
118
114
- name : Install cargo-dist
119
115
run : ${{ matrix.install_dist }}
120
116
# Get the dist-manifest
121
117
- name : Fetch local artifacts
122
- uses : actions/download-artifact@v3
118
+ uses : actions/download-artifact@v4
123
119
with :
124
- name : artifacts
120
+ pattern : artifacts-*
125
121
path : target/distrib/
122
+ merge-multiple : true
126
123
- name : Install dependencies
127
124
run : |
128
125
${{ matrix.packages_install }}
@@ -145,9 +142,9 @@ jobs:
145
142
146
143
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
147
144
- name : " Upload artifacts"
148
- uses : actions/upload-artifact@v3
145
+ uses : actions/upload-artifact@v4
149
146
with :
150
- name : artifacts
147
+ name : artifacts-build-local-${{ join(matrix.targets, '_') }}
151
148
path : |
152
149
${{ steps.cargo-dist.outputs.paths }}
153
150
${{ env.BUILD_MANIFEST_NAME }}
@@ -165,16 +162,16 @@ jobs:
165
162
- uses : actions/checkout@v4
166
163
with :
167
164
submodules : recursive
168
- - name : Install Rust
169
- run : rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
170
165
- name : Install cargo-dist
171
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.7.2/cargo-dist-installer.sh | sh"
166
+ shell : bash
167
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.11.1/cargo-dist-installer.sh | sh"
172
168
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
173
169
- name : Fetch local artifacts
174
- uses : actions/download-artifact@v3
170
+ uses : actions/download-artifact@v4
175
171
with :
176
- name : artifacts
172
+ pattern : artifacts-*
177
173
path : target/distrib/
174
+ merge-multiple : true
178
175
- id : cargo-dist
179
176
shell : bash
180
177
run : |
@@ -188,9 +185,9 @@ jobs:
188
185
189
186
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
190
187
- name : " Upload artifacts"
191
- uses : actions/upload-artifact@v3
188
+ uses : actions/upload-artifact@v4
192
189
with :
193
- name : artifacts
190
+ name : artifacts-build-global
194
191
path : |
195
192
${{ steps.cargo-dist.outputs.paths }}
196
193
${{ env.BUILD_MANIFEST_NAME }}
@@ -221,16 +218,15 @@ jobs:
221
218
- uses : actions/checkout@v4
222
219
with :
223
220
submodules : recursive
224
- - name : Install Rust
225
- run : rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
226
221
- name : Install cargo-dist
227
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.7.2 /cargo-dist-installer.sh | sh"
222
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.11.1 /cargo-dist-installer.sh | sh"
228
223
# Fetch artifacts from scratch-storage
229
224
- name : Fetch artifacts
230
- uses : actions/download-artifact@v3
225
+ uses : actions/download-artifact@v4
231
226
with :
232
- name : artifacts
227
+ pattern : artifacts-*
233
228
path : target/distrib/
229
+ merge-multiple : true
234
230
# Upload files to Axo Releases and create the Releases
235
231
# This is a harmless no-op for Github Releases, hosting for that happens in "announce"
236
232
- id : host
@@ -241,9 +237,10 @@ jobs:
241
237
cat dist-manifest.json
242
238
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
243
239
- name : " Upload dist-manifest.json"
244
- uses : actions/upload-artifact@v3
240
+ uses : actions/upload-artifact@v4
245
241
with :
246
- name : artifacts
242
+ # Overwrite the previous copy
243
+ name : artifacts-dist-manifest
247
244
path : dist-manifest.json
248
245
249
246
# Create an Announcement for all the Axo Releases, updating the "latest" release
@@ -264,23 +261,23 @@ jobs:
264
261
- uses : actions/checkout@v4
265
262
with :
266
263
submodules : recursive
267
- - name : Install Rust
268
- run : rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
269
264
- name : Install cargo-dist
270
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.7.2 /cargo-dist-installer.sh | sh"
265
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.11.1 /cargo-dist-installer.sh | sh"
271
266
- name : Fetch Axo Artifacts
272
- uses : actions/download-artifact@v3
267
+ uses : actions/download-artifact@v4
273
268
with :
274
- name : artifacts
269
+ pattern : artifacts-*
275
270
path : target/distrib/
271
+ merge-multiple : true
276
272
- name : Announce Axo Releases
277
273
run : |
278
274
cargo dist host --steps=announce ${{ needs.plan.outputs.tag-flag }}
279
275
- name : " Download Github Artifacts"
280
- uses : actions/download-artifact@v3
276
+ uses : actions/download-artifact@v4
281
277
with :
282
- name : artifacts
278
+ pattern : artifacts-*
283
279
path : artifacts
280
+ merge-multiple : true
284
281
- name : Cleanup
285
282
run : |
286
283
# Remove the granular manifests
0 commit comments