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
4 changes: 4 additions & 0 deletions .changeset/fancy-parrot-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Fix the publish workflow so `changeset publish` can authenticate its go-git tag push. CI-only change; no module release.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,5 +29,15 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# `changeset publish` pushes tags via go-git, which does not read the
# http.extraheader credentials actions/checkout configures. Embed the
# token in the origin URL so go-git can authenticate the push. Without
# this the push fails with "authentication required: No anonymous write
# access" and no tags are published.
- name: Authenticate git remote for go-git
run: git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
run: changeset publish
Loading