Skip to content

Commit a6e6b36

Browse files
committed
ci: grant id-token permission for PyPI trusted publishing
The publish job inherited the workflow-level `permissions: contents: read`, which drops the default OIDC grant — GitHub then never exposes ACTIONS_ID_TOKEN_REQUEST_URL to the job, so `uv publish` cannot mint a trusted-publishing token and fails with "Trusted publishing failed ... Missing credentials". Add job-level `id-token: write`. Also add zeeker-common to the workflow_dispatch package choice and honor the input in the build step (release events still default to zeeker), so zeeker-common 0.2.0 can be published from the same workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cuh5eJDfVowgpp22s7siE1
1 parent b6cf081 commit a6e6b36

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎.github/workflows/publish-zeeker.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
type: choice
1313
options:
1414
- zeeker
15+
- zeeker-common
1516

1617
permissions:
1718
contents: read
@@ -20,6 +21,12 @@ jobs:
2021
publish:
2122
runs-on: ubuntu-latest
2223
environment: release
24+
permissions:
25+
contents: read
26+
# Required for PyPI Trusted Publishing (OIDC). Without it GitHub does
27+
# not expose ACTIONS_ID_TOKEN_REQUEST_URL to the job and `uv publish`
28+
# fails with "Trusted publishing failed ... Missing credentials".
29+
id-token: write
2330
steps:
2431
- uses: actions/checkout@v4
2532

@@ -32,7 +39,8 @@ jobs:
3239
uses: astral-sh/setup-uv@v3
3340

3441
- name: Build package
35-
run: uv build --package zeeker
42+
# Release events carry no workflow_dispatch input — default to zeeker.
43+
run: uv build --package ${{ inputs.package || 'zeeker' }}
3644

3745
- name: Publish to PyPI
3846
run: uv publish dist/*

0 commit comments

Comments
 (0)