windows, macos: release with the job token #12

Merged
james.maes merged 1 commits from release-job-token into main 2026-11-08 23:20:19 +00:00
3 changed files with 6 additions and 9 deletions

No files matched your search

+2 -4
View File
@@ -35,9 +35,6 @@ on:
description: Name of the checksum asset (use a per-platform name when several jobs release the same tag)
type: string
default: SHA256SUMS
secrets:
PACKAGES_TOKEN:
required: false
permissions:
contents: write
@@ -89,7 +86,8 @@ jobs:
shell: bash
env:
ARTIFACTS: ${{ inputs.artifacts }}
TOKEN: ${{ secrets.PACKAGES_TOKEN || github.token }}
# The job token creates this repository's release (contents: write); no secret needed.
TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
CHECKSUMS: ${{ inputs.checksums }}
run: |
+2 -4
View File
@@ -34,9 +34,6 @@ on:
description: Name of the checksum asset (use a per-platform name when several jobs release the same tag)
type: string
default: SHA256SUMS
secrets:
PACKAGES_TOKEN:
required: false
permissions:
contents: write
@@ -88,7 +85,8 @@ jobs:
shell: pwsh
env:
ARTIFACTS: ${{ inputs.artifacts }}
TOKEN: ${{ secrets.PACKAGES_TOKEN || github.token }}
# The job token creates this repository's release (contents: write); no secret needed.
TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
CHECKSUMS: ${{ inputs.checksums }}
run: |
+2 -1
View File
@@ -202,7 +202,8 @@ jobs:
reports failure with `exit 1` must run as `pwsh -NoProfile -File x.ps1`; called
with `&` it would not stop the script. Test tools that assert on child exit
codes themselves (Pester suites) need `$PSNativeCommandUseErrorActionPreference = $false` first.
- Releases use `PACKAGES_TOKEN` (or the job token). Re-running a tag replaces
- Releases use the job token (`contents: write`); the org `PACKAGES_TOKEN` got
HTTP 403 on the release lookup. Re-running a tag replaces
assets of the same name. A Homebrew or Scoop update can read the release's
`SHA256SUMS`.
- Host limits today: the Windows runner is a batch-logon task with no interactive