Skip to content

Commit 1dca461

Browse files
dist up (#86)
1 parent 50c0afe commit 1dca461

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# This file was autogenerated by cargo-dist: https://opensource.axo.dev/cargo-dist/
1+
# This file was autogenerated by dist: https://opensource.axo.dev/cargo-dist/
22
#
33
# Copyright 2022-2024, axodotdev
44
# SPDX-License-Identifier: MIT or Apache-2.0
55
#
66
# CI that:
77
#
88
# * checks for a Git Tag that looks like a release
9-
# * builds artifacts with cargo-dist (archives, installers, hashes)
9+
# * builds artifacts with dist (archives, installers, hashes)
1010
# * uploads those artifacts to temporary workflow zip
1111
# * on success, uploads the artifacts to a GitHub Release
1212
#
@@ -24,10 +24,10 @@ permissions:
2424
# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
2525
#
2626
# 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 cargo-dist-able).
27+
# package (erroring out if it doesn't have the given version or isn't dist-able).
2828
#
2929
# If PACKAGE_NAME isn't specified, then the announcement will be for all
30-
# (cargo-dist-able) packages in the workspace with that version (this mode is
30+
# (dist-able) packages in the workspace with that version (this mode is
3131
# intended for workspaces with only one dist-able package, or with all dist-able
3232
# packages versioned/released in lockstep).
3333
#
@@ -44,7 +44,7 @@ on:
4444
- '**[0-9]+.[0-9]+.[0-9]+*'
4545

4646
jobs:
47-
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
47+
# Run 'dist plan' (or host) to determine what tasks we need to do
4848
plan:
4949
runs-on: "ubuntu-20.04"
5050
outputs:
@@ -58,25 +58,25 @@ jobs:
5858
- uses: actions/checkout@v4
5959
with:
6060
submodules: recursive
61-
- name: Install cargo-dist
61+
- name: Install dist
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.22.1/cargo-dist-installer.sh | sh"
66-
- name: Cache cargo-dist
65+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.25.1/cargo-dist-installer.sh | sh"
66+
- name: Cache dist
6767
uses: actions/upload-artifact@v4
6868
with:
6969
name: cargo-dist-cache
70-
path: ~/.cargo/bin/cargo-dist
70+
path: ~/.cargo/bin/dist
7171
# sure would be cool if github gave us proper conditionals...
7272
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
7373
# functionality based on whether this is a pull_request, and whether it's from a fork.
7474
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
7575
# but also really annoying to build CI around when it needs secrets to work right.)
7676
- id: plan
7777
run: |
78-
cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
79-
echo "cargo dist ran successfully"
78+
dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
79+
echo "dist ran successfully"
8080
cat plan-dist-manifest.json
8181
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
8282
- name: "Upload dist-manifest.json"
@@ -94,12 +94,12 @@ jobs:
9494
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') }}
9595
strategy:
9696
fail-fast: false
97-
# Target platforms/runners are computed by cargo-dist in create-release.
97+
# Target platforms/runners are computed by dist in create-release.
9898
# Each member of the matrix has the following arguments:
9999
#
100100
# - runner: the github runner
101-
# - dist-args: cli flags to pass to cargo dist
102-
# - install-dist: expression to run to install cargo-dist on the runner
101+
# - dist-args: cli flags to pass to dist
102+
# - install-dist: expression to run to install dist on the runner
103103
#
104104
# Typically there will be:
105105
# - 1 "global" task that builds universal installers
@@ -116,7 +116,7 @@ jobs:
116116
- uses: actions/checkout@v4
117117
with:
118118
submodules: recursive
119-
- name: Install cargo-dist
119+
- name: Install dist
120120
run: ${{ matrix.install_dist }}
121121
# Get the dist-manifest
122122
- name: Fetch local artifacts
@@ -131,8 +131,8 @@ jobs:
131131
- name: Build artifacts
132132
run: |
133133
# Actually do builds and make zips and whatnot
134-
cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
135-
echo "cargo dist ran successfully"
134+
dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
135+
echo "dist ran successfully"
136136
- id: cargo-dist
137137
name: Post-build
138138
# We force bash here just because github makes it really hard to get values up
@@ -167,12 +167,12 @@ jobs:
167167
- uses: actions/checkout@v4
168168
with:
169169
submodules: recursive
170-
- name: Install cached cargo-dist
170+
- name: Install cached dist
171171
uses: actions/download-artifact@v4
172172
with:
173173
name: cargo-dist-cache
174174
path: ~/.cargo/bin/
175-
- run: chmod +x ~/.cargo/bin/cargo-dist
175+
- run: chmod +x ~/.cargo/bin/dist
176176
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
177177
- name: Fetch local artifacts
178178
uses: actions/download-artifact@v4
@@ -183,8 +183,8 @@ jobs:
183183
- id: cargo-dist
184184
shell: bash
185185
run: |
186-
cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
187-
echo "cargo dist ran successfully"
186+
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
187+
echo "dist ran successfully"
188188
189189
# Parse out what we just built and upload it to scratch storage
190190
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
@@ -216,12 +216,12 @@ jobs:
216216
- uses: actions/checkout@v4
217217
with:
218218
submodules: recursive
219-
- name: Install cached cargo-dist
219+
- name: Install cached dist
220220
uses: actions/download-artifact@v4
221221
with:
222222
name: cargo-dist-cache
223223
path: ~/.cargo/bin/
224-
- run: chmod +x ~/.cargo/bin/cargo-dist
224+
- run: chmod +x ~/.cargo/bin/dist
225225
# Fetch artifacts from scratch-storage
226226
- name: Fetch artifacts
227227
uses: actions/download-artifact@v4
@@ -232,7 +232,7 @@ jobs:
232232
- id: host
233233
shell: bash
234234
run: |
235-
cargo dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
235+
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
236236
echo "artifacts uploaded and released successfully"
237237
cat dist-manifest.json
238238
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.{ archive
3636
bin-dir = "{ bin }{ binary-ext }"
3737
pkg-fmt = "zip"
3838

39-
# Config for 'cargo dist'
39+
# Config for 'dist'
4040
[workspace.metadata.dist]
41-
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
42-
cargo-dist-version = "0.22.1"
41+
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
42+
cargo-dist-version = "0.25.1"
4343
# CI backends to support
4444
ci = "github"
4545
# The installers to generate for each app

0 commit comments

Comments
 (0)