Skip to content

Commit 1f896ca

Browse files
authored
Merge pull request #69 from oSoMoN/cargo-dist-version-0.13.3
CI: Update 'cargo dist' to version 0.13.3
2 parents 61314ea + 713bd21 commit 1f896ca

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Copyright 2022-2023, axodotdev
1+
# Copyright 2022-2024, axodotdev
22
# SPDX-License-Identifier: MIT or Apache-2.0
33
#
44
# CI that:
55
#
66
# * checks for a Git Tag that looks like a release
77
# * builds artifacts with cargo-dist (archives, installers, hashes)
88
# * 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
1010
#
11-
# Note that the Github Release will be created with a generated
11+
# Note that the GitHub Release will be created with a generated
1212
# title/body based on your changelogs.
1313

1414
name: Release
@@ -31,7 +31,7 @@ permissions:
3131
# packages versioned/released in lockstep).
3232
#
3333
# 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
3535
# will hard limit this to 3 tags per commit, as it will assume more tags is a
3636
# mistake.
3737
#
@@ -62,7 +62,7 @@ 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.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.3/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.
@@ -105,10 +105,15 @@ jobs:
105105
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106106
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
107107
steps:
108+
- name: enable windows longpaths
109+
run: |
110+
git config --global core.longpaths true
108111
- uses: actions/checkout@v4
109112
with:
110113
submodules: recursive
111114
- uses: swatinem/rust-cache@v2
115+
with:
116+
key: ${{ join(matrix.targets, '-') }}
112117
- name: Install cargo-dist
113118
run: ${{ matrix.install_dist }}
114119
# Get the dist-manifest
@@ -135,7 +140,7 @@ jobs:
135140
run: |
136141
# Parse out what we just built and upload it to scratch storage
137142
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
138-
jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
143+
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
139144
echo "EOF" >> "$GITHUB_OUTPUT"
140145
141146
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
@@ -162,7 +167,7 @@ jobs:
162167
submodules: recursive
163168
- name: Install cargo-dist
164169
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"
170+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.3/cargo-dist-installer.sh | sh"
166171
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
167172
- name: Fetch local artifacts
168173
uses: actions/download-artifact@v4
@@ -178,7 +183,7 @@ jobs:
178183
179184
# Parse out what we just built and upload it to scratch storage
180185
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
181-
jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
186+
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
182187
echo "EOF" >> "$GITHUB_OUTPUT"
183188
184189
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
@@ -207,15 +212,15 @@ jobs:
207212
with:
208213
submodules: recursive
209214
- 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"
215+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.3/cargo-dist-installer.sh | sh"
211216
# Fetch artifacts from scratch-storage
212217
- name: Fetch artifacts
213218
uses: actions/download-artifact@v4
214219
with:
215220
pattern: artifacts-*
216221
path: target/distrib/
217222
merge-multiple: true
218-
# This is a harmless no-op for Github Releases, hosting for that happens in "announce"
223+
# This is a harmless no-op for GitHub Releases, hosting for that happens in "announce"
219224
- id: host
220225
shell: bash
221226
run: |
@@ -230,7 +235,7 @@ jobs:
230235
name: artifacts-dist-manifest
231236
path: dist-manifest.json
232237

233-
# Create a Github Release while uploading all files to it
238+
# Create a GitHub Release while uploading all files to it
234239
announce:
235240
needs:
236241
- plan
@@ -246,7 +251,7 @@ jobs:
246251
- uses: actions/checkout@v4
247252
with:
248253
submodules: recursive
249-
- name: "Download Github Artifacts"
254+
- name: "Download GitHub Artifacts"
250255
uses: actions/download-artifact@v4
251256
with:
252257
pattern: artifacts-*
@@ -256,7 +261,7 @@ jobs:
256261
run: |
257262
# Remove the granular manifests
258263
rm -f artifacts/*-dist-manifest.json
259-
- name: Create Github Release
264+
- name: Create GitHub Release
260265
uses: ncipollo/release-action@v1
261266
with:
262267
tag: ${{ needs.plan.outputs.tag }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lto = "thin"
3535
# Config for 'cargo dist'
3636
[workspace.metadata.dist]
3737
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
38-
cargo-dist-version = "0.12.0"
38+
cargo-dist-version = "0.13.3"
3939
# CI backends to support
4040
ci = ["github"]
4141
# The installers to generate for each app

0 commit comments

Comments
 (0)