Skip to content

Commit 9bbf79c

Browse files
committed
chore: update to cargo-dist 0.16, enable attestations
1 parent 88633b8 commit 9bbf79c

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/release.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -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.15.0/cargo-dist-installer.sh | sh"
65+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.16.0/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.
@@ -114,6 +114,7 @@ jobs:
114114
- uses: swatinem/rust-cache@v2
115115
with:
116116
key: ${{ join(matrix.targets, '-') }}
117+
cache-provider: ${{ matrix.cache_provider }}
117118
- name: Install cargo-dist
118119
run: ${{ matrix.install_dist }}
119120
# Get the dist-manifest
@@ -167,7 +168,7 @@ jobs:
167168
submodules: recursive
168169
- name: Install cargo-dist
169170
shell: bash
170-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.0/cargo-dist-installer.sh | sh"
171+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.16.0/cargo-dist-installer.sh | sh"
171172
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
172173
- name: Fetch local artifacts
173174
uses: actions/download-artifact@v4
@@ -212,7 +213,7 @@ jobs:
212213
with:
213214
submodules: recursive
214215
- name: Install cargo-dist
215-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.0/cargo-dist-installer.sh | sh"
216+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.16.0/cargo-dist-installer.sh | sh"
216217
# Fetch artifacts from scratch-storage
217218
- name: Fetch artifacts
218219
uses: actions/download-artifact@v4
@@ -262,10 +263,13 @@ jobs:
262263
# Remove the granular manifests
263264
rm -f artifacts/*-dist-manifest.json
264265
- name: Create GitHub Release
265-
uses: ncipollo/release-action@v1
266-
with:
267-
tag: ${{ needs.plan.outputs.tag }}
268-
name: ${{ fromJson(needs.host.outputs.val).announcement_title }}
269-
body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }}
270-
prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }}
271-
artifacts: "artifacts/*"
266+
env:
267+
PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}"
268+
ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}"
269+
ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}"
270+
run: |
271+
# Write and read notes from a file to avoid quoting breaking things
272+
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
273+
274+
gh release create "${{ needs.plan.outputs.tag }}" --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" $PRERELEASE_FLAG
275+
gh release upload "${{ needs.plan.outputs.tag }}" artifacts/*

Cargo.toml

+6-9
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,26 @@ features = ["runtime-tokio-rustls", "time", "postgres", "uuid"]
5858

5959
# Config for 'cargo dist'
6060
[workspace.metadata.dist]
61+
# Path that installers should place binaries in
6162
install-path = "~/.atuin/bin"
6263
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
63-
cargo-dist-version = "0.15.0"
64+
cargo-dist-version = "0.16.0"
6465
# CI backends to support
6566
ci = "github"
6667
# The installers to generate for each app
6768
installers = ["shell"]
6869
# Target platforms to build apps for (Rust target-triple syntax)
69-
targets = [
70-
"aarch64-apple-darwin",
71-
"aarch64-unknown-linux-gnu",
72-
"aarch64-unknown-linux-musl",
73-
"x86_64-apple-darwin",
74-
"x86_64-unknown-linux-gnu",
75-
"x86_64-unknown-linux-musl",
76-
]
70+
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"]
7771
# Publish jobs to run in CI
7872
pr-run-mode = "plan"
7973
# Whether to install an updater program
8074
install-updater = true
8175
# The archive format to use for non-windows builds (defaults .tar.xz)
8276
unix-archive = ".tar.gz"
8377

78+
# enable GitHub's experimental artifact attestation feature
79+
github-attestations = true
80+
8481
# The profile that 'cargo dist' will build with
8582
[profile.dist]
8683
inherits = "release"

0 commit comments

Comments
 (0)