Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ permissions:
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write # GoReleaser uploads the GitHub Release
id-token: write # keyless (sigstore) signing for build provenance
attestations: write # record the provenance attestation
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
Expand Down Expand Up @@ -50,6 +54,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Signs the built archives with keyless sigstore provenance, verifiable
# with `gh attestation verify <archive> --repo tollbit/cli`.
- name: Attest build provenance
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
with:
subject-path: "dist/*.tar.gz,dist/*.zip"

npm-publish:
needs: goreleaser
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ archives:
checksum:
name_template: "tollbit_{{ .Version }}_checksums.txt"

# Allow re-running a tag release (e.g. after fixing npm publish) without 422s on existing assets.
# Published artifacts are immutable: re-running a release keeps existing assets
# rather than overwriting them (checksums included). To fix a bad release, cut a
# new version — do not mutate a published one. Mirrors the immutable tag ruleset.
release:
replace_existing_artifacts: true
mode: replace
mode: keep-existing

changelog:
use: git
Expand Down
Loading