Skip to content

Commit 0759f03

Browse files
committed
ci: update cargo-dist
1 parent 0ac10ea commit 0759f03

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# This file was autogenerated by dist: https://github.com/astral-sh/cargo-dist
1+
# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
22
#
33
# Copyright 2022-2024, axodotdev
4-
# Copyright 2025 Astral Software Inc.
54
# SPDX-License-Identifier: MIT or Apache-2.0
65
#
76
# CI that:
@@ -16,9 +15,7 @@
1615

1716
name: Release
1817
permissions:
19-
"attestations": "write"
2018
"contents": "write"
21-
"id-token": "write"
2219

2320
# This task will run whenever you push a git tag that looks like a version
2421
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
@@ -67,7 +64,7 @@ jobs:
6764
# we specify bash to get pipefail; it guards against the `curl` command
6865
# failing. otherwise `sh` won't catch that `curl` returned non-0
6966
shell: bash
70-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.4/cargo-dist-installer.sh | sh"
67+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.2/cargo-dist-installer.sh | sh"
7168
- name: Cache dist
7269
uses: actions/upload-artifact@v4
7370
with:
@@ -115,6 +112,10 @@ jobs:
115112
env:
116113
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117114
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
115+
permissions:
116+
"attestations": "write"
117+
"contents": "read"
118+
"id-token": "write"
118119
steps:
119120
- name: enable windows longpaths
120121
run: |
@@ -234,8 +235,8 @@ jobs:
234235
- build-local-artifacts
235236
- build-global-artifacts
236237
- custom-build-man
237-
# Only run if we're "publishing", and only if local and global didn't fail (skipped is fine)
238-
if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.custom-build-man.result == 'skipped' || needs.custom-build-man.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
238+
# Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
239+
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.custom-build-man.result == 'skipped' || needs.custom-build-man.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
239240
env:
240241
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241242
runs-on: "ubuntu-latest"
@@ -309,7 +310,7 @@ jobs:
309310
steps:
310311
- uses: actions/checkout@v4
311312
with:
312-
# persist-credentials: false
313+
persist-credentials: true
313314
repository: "elkowar/homebrew-tap"
314315
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
315316
# So we have access to the formula

dist-workspace.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pr-run-mode = "plan"
1818
# CI backends to support
1919
ci = "github"
2020
# The installers to generate for each app
21-
installers = ["shell", "powershell"]
21+
installers = ["shell", "powershell", "homebrew"]
2222
# Customize the Homebrew formula name
2323
formula = "yolk"
2424
# Target platforms to build apps for (Rust target-triple syntax)
@@ -28,7 +28,11 @@ install-path = "CARGO_HOME"
2828
# Whether to install an updater program
2929
install-updater = false
3030
# Skip checking whether the specified configuration files are up to date
31-
allow-dirty = ["ci"]
31+
#allow-dirty = ["ci"]
32+
# A GitHub repo to push Homebrew formulas to
33+
tap = "elkowar/homebrew-tap"
34+
# Publish jobs to run in CI
35+
publish-jobs = ["homebrew"]
3236

3337
[dist.github-custom-runners]
3438
# Use an `ubuntu-latest` runner for all "global" steps of the release process,

0 commit comments

Comments
 (0)