@@ -165,10 +165,18 @@ jobs:
165165 if : startsWith(github.ref, 'refs/tags/v')
166166
167167 steps :
168+ - name : Generate token for Release Bot
169+ id : generate-token
170+ uses : actions/create-github-app-token@v2
171+ with :
172+ app-id : ${{ vars.RELEASE_BOT_APP_ID }}
173+ private-key : ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
174+
168175 - name : Checkout repository
169176 uses : actions/checkout@v5
170177 with :
171178 fetch-depth : 0
179+ token : ${{ steps.generate-token.outputs.token }} # ← Pass token HERE!
172180
173181 - name : Set up uv
174182 uses : astral-sh/setup-uv@v6
@@ -187,13 +195,15 @@ jobs:
187195 DATE=$(date +%Y-%m-%d)
188196 sed -i "s/^version: .*/version: $VERSION/" CITATION.cff
189197 sed -i "s/^date-released: .*/date-released: $DATE/" CITATION.cff
190- git config user.name github-actions[bot]
191- git config user.email 41898282+github-actions[bot]@users.noreply.github.com
192- git add CITATION.cff
193- git commit -m "Update CITATION.cff to $VERSION" || true
194- git push origin HEAD:main
195- continue-on-error : true
196198
199+ - name : Commit CITATION.cff changes
200+ uses : stefanzweifel/git-auto-commit-action@v7
201+ with :
202+ commit_message : " Update CITATION.cff to ${{ github.ref_name }}" # Will be "v1.2.3"
203+ file_pattern : ' CITATION.cff'
204+ commit_user_name : github-actions[bot]
205+ commit_user_email : 41898282+github-actions[bot]@users.noreply.github.com
206+ commit_author : github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
197207 - name : Extract release notes
198208 run : |
199209 VERSION=${GITHUB_REF#refs/tags/v}
0 commit comments