Skip to content

Commit 094e339

Browse files
committed
Fix cargo dist
1 parent c6ecd29 commit 094e339

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515

1616
name: Release
1717
permissions:
18-
"attestations": "write"
1918
"contents": "write"
20-
"id-token": "write"
2119

2220
# This task will run whenever you push a git tag that looks like a version
2321
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
@@ -66,7 +64,7 @@ jobs:
6664
# we specify bash to get pipefail; it guards against the `curl` command
6765
# failing. otherwise `sh` won't catch that `curl` returned non-0
6866
shell: bash
69-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.0/cargo-dist-installer.sh | sh"
67+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh | sh"
7068
- name: Cache dist
7169
uses: actions/upload-artifact@v4
7270
with:
@@ -114,6 +112,10 @@ jobs:
114112
env:
115113
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116114
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
115+
permissions:
116+
"attestations": "write"
117+
"contents": "read"
118+
"id-token": "write"
117119
steps:
118120
- name: enable windows longpaths
119121
run: |
@@ -129,6 +131,10 @@ jobs:
129131
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
130132
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
131133
fi
134+
- uses: swatinem/rust-cache@v2
135+
with:
136+
key: ${{ join(matrix.targets, '-') }}
137+
cache-provider: ${{ matrix.cache_provider }}
132138
- name: Install dist
133139
run: ${{ matrix.install_dist.run }}
134140
# Get the dist-manifest
@@ -242,8 +248,8 @@ jobs:
242248
- plan
243249
- build-local-artifacts
244250
- build-global-artifacts
245-
# Only run if we're "publishing", and only if local and global didn't fail (skipped is fine)
246-
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
251+
# Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
252+
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
247253
env:
248254
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
249255
runs-on: "ubuntu-22.04"

dist-workspace.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ members = ["cargo:."]
44
# Config for 'dist'
55
[dist]
66
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
7-
cargo-dist-version = "0.30.0"
7+
cargo-dist-version = "0.30.3"
88
# CI backends to support
99
ci = "github"
1010
# The installers to generate for each app
1111
installers = ["shell", "powershell"]
1212
# Target platforms to build apps for (Rust target-triple syntax)
1313
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
1414
# Which actions to run on pull requests
15-
pr-run-mode = "plan"
15+
pr-run-mode = "upload"
1616
# Whether dist should create a Github Release or use an existing draft
1717
create-release = false
1818
# Whether to install an updater program
@@ -33,5 +33,6 @@ libtirpc-dev = '*'
3333

3434
# otherwise the builds fail for whatever reason
3535
[dist.github-custom-runners]
36-
aarch64-apple-darwin = "macos-14"
36+
x86_64-apple-darwin = "macos-15-intel"
37+
aarch64-apple-darwin = "macos-15"
3738
aarch64-unknown-linux-gnu = "ubuntu-22.04-arm"

0 commit comments

Comments
 (0)