1
- # This file was autogenerated by dist: https://opensource.axo.dev/cargo-dist/
1
+ # This file was autogenerated by cargo- dist: https://opensource.axo.dev/cargo-dist/
2
2
#
3
3
# Copyright 2022-2024, axodotdev
4
4
# SPDX-License-Identifier: MIT or Apache-2.0
5
5
#
6
6
# CI that:
7
7
#
8
8
# * checks for a Git Tag that looks like a release
9
- # * builds artifacts with dist (archives, installers, hashes)
9
+ # * builds artifacts with cargo- dist (archives, installers, hashes)
10
10
# * uploads those artifacts to temporary workflow zip
11
11
# * on success, uploads the artifacts to a GitHub Release
12
12
#
@@ -24,10 +24,10 @@ permissions:
24
24
# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
25
25
#
26
26
# If PACKAGE_NAME is specified, then the announcement will be for that
27
- # package (erroring out if it doesn't have the given version or isn't dist-able).
27
+ # package (erroring out if it doesn't have the given version or isn't cargo- dist-able).
28
28
#
29
29
# If PACKAGE_NAME isn't specified, then the announcement will be for all
30
- # (dist-able) packages in the workspace with that version (this mode is
30
+ # (cargo- dist-able) packages in the workspace with that version (this mode is
31
31
# intended for workspaces with only one dist-able package, or with all dist-able
32
32
# packages versioned/released in lockstep).
33
33
#
45
45
- ' **[0-9]+.[0-9]+.[0-9]+*'
46
46
47
47
jobs :
48
- # Run 'dist plan' (or host) to determine what tasks we need to do
48
+ # Run 'cargo dist plan' (or host) to determine what tasks we need to do
49
49
plan :
50
50
runs-on : " ubuntu-20.04"
51
51
outputs :
@@ -59,25 +59,25 @@ jobs:
59
59
- uses : actions/checkout@v4
60
60
with :
61
61
submodules : recursive
62
- - name : Install dist
62
+ - name : Install cargo- dist
63
63
# we specify bash to get pipefail; it guards against the `curl` command
64
64
# failing. otherwise `sh` won't catch that `curl` returned non-0
65
65
shell : bash
66
- run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.25 .1/cargo-dist-installer.sh | sh"
67
- - name : Cache dist
66
+ run : " curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.22 .1/cargo-dist-installer.sh | sh"
67
+ - name : Cache cargo- dist
68
68
uses : actions/upload-artifact@v4
69
69
with :
70
70
name : cargo-dist-cache
71
- path : ~/.cargo/bin/dist
71
+ path : ~/.cargo/bin/cargo- dist
72
72
# sure would be cool if github gave us proper conditionals...
73
73
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
74
74
# functionality based on whether this is a pull_request, and whether it's from a fork.
75
75
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
76
76
# but also really annoying to build CI around when it needs secrets to work right.)
77
77
- id : plan
78
78
run : |
79
- dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
80
- echo "dist ran successfully"
79
+ cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
80
+ echo "cargo dist ran successfully"
81
81
cat plan-dist-manifest.json
82
82
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
83
83
- name : " Upload dist-manifest.json"
@@ -95,12 +95,12 @@ jobs:
95
95
if : ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
96
96
strategy :
97
97
fail-fast : false
98
- # Target platforms/runners are computed by dist in create-release.
98
+ # Target platforms/runners are computed by cargo- dist in create-release.
99
99
# Each member of the matrix has the following arguments:
100
100
#
101
101
# - runner: the github runner
102
- # - dist-args: cli flags to pass to dist
103
- # - install-dist: expression to run to install dist on the runner
102
+ # - dist-args: cli flags to pass to cargo dist
103
+ # - install-dist: expression to run to install cargo- dist on the runner
104
104
#
105
105
# Typically there will be:
106
106
# - 1 "global" task that builds universal installers
@@ -117,7 +117,7 @@ jobs:
117
117
- uses : actions/checkout@v4
118
118
with :
119
119
submodules : recursive
120
- - name : Install dist
120
+ - name : Install cargo- dist
121
121
run : ${{ matrix.install_dist }}
122
122
# Get the dist-manifest
123
123
- name : Fetch local artifacts
@@ -132,8 +132,8 @@ jobs:
132
132
- name : Build artifacts
133
133
run : |
134
134
# Actually do builds and make zips and whatnot
135
- dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
136
- echo "dist ran successfully"
135
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
136
+ echo "cargo dist ran successfully"
137
137
- id : cargo-dist
138
138
name : Post-build
139
139
# We force bash here just because github makes it really hard to get values up
@@ -168,12 +168,12 @@ jobs:
168
168
- uses : actions/checkout@v4
169
169
with :
170
170
submodules : recursive
171
- - name : Install cached dist
171
+ - name : Install cached cargo- dist
172
172
uses : actions/download-artifact@v4
173
173
with :
174
174
name : cargo-dist-cache
175
175
path : ~/.cargo/bin/
176
- - run : chmod +x ~/.cargo/bin/dist
176
+ - run : chmod +x ~/.cargo/bin/cargo- dist
177
177
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
178
178
- name : Fetch local artifacts
179
179
uses : actions/download-artifact@v4
@@ -184,8 +184,8 @@ jobs:
184
184
- id : cargo-dist
185
185
shell : bash
186
186
run : |
187
- dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
188
- echo "dist ran successfully"
187
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
188
+ echo "cargo dist ran successfully"
189
189
190
190
# Parse out what we just built and upload it to scratch storage
191
191
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
@@ -217,12 +217,12 @@ jobs:
217
217
- uses : actions/checkout@v4
218
218
with :
219
219
submodules : recursive
220
- - name : Install cached dist
220
+ - name : Install cached cargo- dist
221
221
uses : actions/download-artifact@v4
222
222
with :
223
223
name : cargo-dist-cache
224
224
path : ~/.cargo/bin/
225
- - run : chmod +x ~/.cargo/bin/dist
225
+ - run : chmod +x ~/.cargo/bin/cargo- dist
226
226
# Fetch artifacts from scratch-storage
227
227
- name : Fetch artifacts
228
228
uses : actions/download-artifact@v4
@@ -233,7 +233,7 @@ jobs:
233
233
- id : host
234
234
shell : bash
235
235
run : |
236
- dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
236
+ cargo dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
237
237
echo "artifacts uploaded and released successfully"
238
238
cat dist-manifest.json
239
239
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
0 commit comments