@@ -72,11 +72,14 @@ jobs:
7272 permissions :
7373 id-token : write
7474 contents : write
75+ issues : write
76+ pull-requests : write
7577
7678 steps :
7779 - uses : actions/checkout@v4
7880 with :
7981 fetch-depth : 0
82+ token : ${{ secrets.GITHUB_TOKEN }}
8083
8184 - name : Set up Python
8285 uses : actions/setup-python@v5
@@ -96,17 +99,22 @@ jobs:
9699
97100 - name : Python Semantic Release
98101 id : semantic-release
99- uses : python-semantic-release/python-semantic-release@v9.1.1
100- with :
101- github_token : ${{ secrets.GITHUB_TOKEN }}
102-
103- - name : Publish release to GitHub
104- if : steps.semantic-release.outputs.released == 'true'
105- env :
106- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107102 run : |
108- echo "Released version ${{ steps.semantic-release.outputs.version }}"
109- gh release create v${{ steps.semantic-release.outputs.version }} \
110- --title "v${{ steps.semantic-release.outputs.version }}" \
111- --notes "${{ steps.semantic-release.outputs.release_notes }}" \
112- dist/*
103+ git config --global user.name "semantic-release"
104+ git config --global user.email "semantic-release@users.noreply.github.com"
105+ # Debug information
106+ echo "Current git status:"
107+ git status
108+ echo "Current branch:"
109+ git branch
110+ # Run semantic release with verbose output
111+ poetry run semantic-release --verbose version
112+ # Only publish if version command succeeded
113+ if [ $? -eq 0 ]; then
114+ poetry run semantic-release --verbose publish
115+ else
116+ echo "Version command failed, skipping publish"
117+ exit 1
118+ fi
119+ env :
120+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments