Skip to content

Commit c1548c4

Browse files
authored
fix(release): restore GitHub release creation with gh CLI (#401)
The "Create GitHub release" step was broken in PR #386, which removed the GITHUB_TOKEN env var from the actions/create-release action. The action requires the token to be passed explicitly, so releases were being published to PyPI but GitHub tags/releases were not created. This replaces the archived actions/create-release@v1 with the gh CLI, which is already used elsewhere in this workflow. The gh CLI properly uses GH_TOKEN for authentication.
1 parent f1c6da2 commit c1548c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ jobs:
4444
run: uv run make release && uv run make release_analytics
4545

4646
- name: Create GitHub release
47-
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
48-
with:
49-
tag_name: v${{ env.REPO_VERSION }}
50-
release_name: ${{ env.REPO_VERSION }}
47+
env:
48+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
gh release create "v${{ env.REPO_VERSION }}" \
51+
--title "${{ env.REPO_VERSION }}" \
52+
--generate-notes
5153
5254
- name: Dispatch generate-references for posthog-python
5355
env:

0 commit comments

Comments
 (0)