Skip to content

Commit 99895ed

Browse files
committed
0.2.8
1 parent 1ca6113 commit 99895ed

File tree

4 files changed

+288
-319
lines changed

4 files changed

+288
-319
lines changed

.github/workflows/release.yml

+33-36
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,27 @@ jobs:
6060
- uses: actions/checkout@v4
6161
with:
6262
submodules: recursive
63-
- name: Install Rust
64-
run: rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
6563
- name: Install cargo-dist
6664
# we specify bash to get pipefail; it guards against the `curl` command
6765
# failing. otherwise `sh` won't catch that `curl` returned non-0
6866
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"
7068
# sure would be cool if github gave us proper conditionals...
7169
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
7270
# functionality based on whether this is a pull_request, and whether it's from a fork.
7371
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
7472
# but also really annoying to build CI around when it needs secrets to work right.)
7573
- id: plan
7674
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
7876
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"
8179
- name: "Upload dist-manifest.json"
82-
uses: actions/upload-artifact@v3
80+
uses: actions/upload-artifact@v4
8381
with:
84-
name: artifacts
85-
path: dist-manifest.json
82+
name: artifacts-plan-dist-manifest
83+
path: plan-dist-manifest.json
8684

8785
# Build and packages all the platform-specific things
8886
build-local-artifacts:
@@ -112,17 +110,16 @@ jobs:
112110
- uses: actions/checkout@v4
113111
with:
114112
submodules: recursive
115-
- name: Install Rust
116-
run: rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
117113
- uses: swatinem/rust-cache@v2
118114
- name: Install cargo-dist
119115
run: ${{ matrix.install_dist }}
120116
# Get the dist-manifest
121117
- name: Fetch local artifacts
122-
uses: actions/download-artifact@v3
118+
uses: actions/download-artifact@v4
123119
with:
124-
name: artifacts
120+
pattern: artifacts-*
125121
path: target/distrib/
122+
merge-multiple: true
126123
- name: Install dependencies
127124
run: |
128125
${{ matrix.packages_install }}
@@ -145,9 +142,9 @@ jobs:
145142
146143
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
147144
- name: "Upload artifacts"
148-
uses: actions/upload-artifact@v3
145+
uses: actions/upload-artifact@v4
149146
with:
150-
name: artifacts
147+
name: artifacts-build-local-${{ join(matrix.targets, '_') }}
151148
path: |
152149
${{ steps.cargo-dist.outputs.paths }}
153150
${{ env.BUILD_MANIFEST_NAME }}
@@ -165,16 +162,16 @@ jobs:
165162
- uses: actions/checkout@v4
166163
with:
167164
submodules: recursive
168-
- name: Install Rust
169-
run: rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
170165
- 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"
172168
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
173169
- name: Fetch local artifacts
174-
uses: actions/download-artifact@v3
170+
uses: actions/download-artifact@v4
175171
with:
176-
name: artifacts
172+
pattern: artifacts-*
177173
path: target/distrib/
174+
merge-multiple: true
178175
- id: cargo-dist
179176
shell: bash
180177
run: |
@@ -188,9 +185,9 @@ jobs:
188185
189186
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
190187
- name: "Upload artifacts"
191-
uses: actions/upload-artifact@v3
188+
uses: actions/upload-artifact@v4
192189
with:
193-
name: artifacts
190+
name: artifacts-build-global
194191
path: |
195192
${{ steps.cargo-dist.outputs.paths }}
196193
${{ env.BUILD_MANIFEST_NAME }}
@@ -221,16 +218,15 @@ jobs:
221218
- uses: actions/checkout@v4
222219
with:
223220
submodules: recursive
224-
- name: Install Rust
225-
run: rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
226221
- 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"
228223
# Fetch artifacts from scratch-storage
229224
- name: Fetch artifacts
230-
uses: actions/download-artifact@v3
225+
uses: actions/download-artifact@v4
231226
with:
232-
name: artifacts
227+
pattern: artifacts-*
233228
path: target/distrib/
229+
merge-multiple: true
234230
# Upload files to Axo Releases and create the Releases
235231
# This is a harmless no-op for Github Releases, hosting for that happens in "announce"
236232
- id: host
@@ -241,9 +237,10 @@ jobs:
241237
cat dist-manifest.json
242238
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
243239
- name: "Upload dist-manifest.json"
244-
uses: actions/upload-artifact@v3
240+
uses: actions/upload-artifact@v4
245241
with:
246-
name: artifacts
242+
# Overwrite the previous copy
243+
name: artifacts-dist-manifest
247244
path: dist-manifest.json
248245

249246
# Create an Announcement for all the Axo Releases, updating the "latest" release
@@ -264,23 +261,23 @@ jobs:
264261
- uses: actions/checkout@v4
265262
with:
266263
submodules: recursive
267-
- name: Install Rust
268-
run: rustup update "1.72.1" --no-self-update && rustup default "1.72.1"
269264
- 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"
271266
- name: Fetch Axo Artifacts
272-
uses: actions/download-artifact@v3
267+
uses: actions/download-artifact@v4
273268
with:
274-
name: artifacts
269+
pattern: artifacts-*
275270
path: target/distrib/
271+
merge-multiple: true
276272
- name: Announce Axo Releases
277273
run: |
278274
cargo dist host --steps=announce ${{ needs.plan.outputs.tag-flag }}
279275
- name: "Download Github Artifacts"
280-
uses: actions/download-artifact@v3
276+
uses: actions/download-artifact@v4
281277
with:
282-
name: artifacts
278+
pattern: artifacts-*
283279
path: artifacts
280+
merge-multiple: true
284281
- name: Cleanup
285282
run: |
286283
# Remove the granular manifests

0 commit comments

Comments
 (0)