Skip to content

Commit cf656a3

Browse files
authored
fix: configure git credentials in publish job for tag push (#188)
## Summary The build/publish job split (4f9b81c) broke tag pushing — the publish job downloads the workspace artifact which includes `.git` but not the credential helper that `actions/checkout` configures. Adds `url.insteadOf` to inject `GITHUB_TOKEN` for `git push` without collapsing the read-only build / write publish security boundary. ## Test plan - [x] Preserves the security split (build=read-only, publish=write) - [x] No new secrets or tokens required — uses existing GITHUB_TOKEN - [x] The publish job already has `contents: write` permission
2 parents 51ee2b1 + e279670 commit cf656a3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ jobs:
8282
with:
8383
name: workspace
8484

85+
- name: Configure git credentials
86+
run: |
87+
git config --local url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
88+
8589
- uses: pnpm/action-setup@v4
8690
- uses: actions/setup-node@v4
8791
with:

0 commit comments

Comments
 (0)