1
- # Copyright 2022-2023 , axodotdev
1
+ # Copyright 2022-2024 , axodotdev
2
2
# SPDX-License-Identifier: MIT or Apache-2.0
3
3
#
4
4
# CI that:
5
5
#
6
6
# * checks for a Git Tag that looks like a release
7
7
# * builds artifacts with cargo-dist (archives, installers, hashes)
8
8
# * uploads those artifacts to temporary workflow zip
9
- # * on success, uploads the artifacts to a Github Release
9
+ # * on success, uploads the artifacts to a GitHub Release
10
10
#
11
- # Note that the Github Release will be created with a generated
11
+ # Note that the GitHub Release will be created with a generated
12
12
# title/body based on your changelogs.
13
13
14
14
name : Release
@@ -31,7 +31,7 @@ permissions:
31
31
# packages versioned/released in lockstep).
32
32
#
33
33
# If you push multiple tags at once, separate instances of this workflow will
34
- # spin up, creating an independent announcement for each one. However Github
34
+ # spin up, creating an independent announcement for each one. However, GitHub
35
35
# will hard limit this to 3 tags per commit, as it will assume more tags is a
36
36
# mistake.
37
37
#
62
62
# we specify bash to get pipefail; it guards against the `curl` command
63
63
# failing. otherwise `sh` won't catch that `curl` returned non-0
64
64
shell : bash
65
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.12.0 /cargo-dist-installer.sh | sh"
65
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2 /cargo-dist-installer.sh | sh"
66
66
# sure would be cool if github gave us proper conditionals...
67
67
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
68
68
# functionality based on whether this is a pull_request, and whether it's from a fork.
@@ -109,6 +109,8 @@ jobs:
109
109
with :
110
110
submodules : recursive
111
111
- uses : swatinem/rust-cache@v2
112
+ with :
113
+ key : ${{ join(matrix.targets, '-') }}
112
114
- name : Install cargo-dist
113
115
run : ${{ matrix.install_dist }}
114
116
# Get the dist-manifest
@@ -135,7 +137,7 @@ jobs:
135
137
run : |
136
138
# Parse out what we just built and upload it to scratch storage
137
139
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
138
- jq --raw-output ".artifacts[]?.path | select( . != null ) " dist-manifest.json >> "$GITHUB_OUTPUT"
140
+ jq --raw-output ".upload_files[] " dist-manifest.json >> "$GITHUB_OUTPUT"
139
141
echo "EOF" >> "$GITHUB_OUTPUT"
140
142
141
143
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
@@ -162,7 +164,7 @@ jobs:
162
164
submodules : recursive
163
165
- name : Install cargo-dist
164
166
shell : bash
165
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.12.0 /cargo-dist-installer.sh | sh"
167
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2 /cargo-dist-installer.sh | sh"
166
168
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
167
169
- name : Fetch local artifacts
168
170
uses : actions/download-artifact@v4
@@ -178,7 +180,7 @@ jobs:
178
180
179
181
# Parse out what we just built and upload it to scratch storage
180
182
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
181
- jq --raw-output ".artifacts[]?.path | select( . != null ) " dist-manifest.json >> "$GITHUB_OUTPUT"
183
+ jq --raw-output ".upload_files[] " dist-manifest.json >> "$GITHUB_OUTPUT"
182
184
echo "EOF" >> "$GITHUB_OUTPUT"
183
185
184
186
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
@@ -207,15 +209,15 @@ jobs:
207
209
with :
208
210
submodules : recursive
209
211
- name : Install cargo-dist
210
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.12.0 /cargo-dist-installer.sh | sh"
212
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.2 /cargo-dist-installer.sh | sh"
211
213
# Fetch artifacts from scratch-storage
212
214
- name : Fetch artifacts
213
215
uses : actions/download-artifact@v4
214
216
with :
215
217
pattern : artifacts-*
216
218
path : target/distrib/
217
219
merge-multiple : true
218
- # This is a harmless no-op for Github Releases, hosting for that happens in "announce"
220
+ # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce"
219
221
- id : host
220
222
shell : bash
221
223
run : |
@@ -230,7 +232,7 @@ jobs:
230
232
name : artifacts-dist-manifest
231
233
path : dist-manifest.json
232
234
233
- # Create a Github Release while uploading all files to it
235
+ # Create a GitHub Release while uploading all files to it
234
236
announce :
235
237
needs :
236
238
- plan
@@ -246,7 +248,7 @@ jobs:
246
248
- uses : actions/checkout@v4
247
249
with :
248
250
submodules : recursive
249
- - name : " Download Github Artifacts"
251
+ - name : " Download GitHub Artifacts"
250
252
uses : actions/download-artifact@v4
251
253
with :
252
254
pattern : artifacts-*
@@ -256,7 +258,7 @@ jobs:
256
258
run : |
257
259
# Remove the granular manifests
258
260
rm -f artifacts/*-dist-manifest.json
259
- - name : Create Github Release
261
+ - name : Create GitHub Release
260
262
uses : ncipollo/release-action@v1
261
263
with :
262
264
tag : ${{ needs.plan.outputs.tag }}
0 commit comments