@@ -135,25 +135,21 @@ jobs:
135135 echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
136136 echo "New version: $NEW_VERSION"
137137
138- - name : Create or Update Git Tag
139- run : |
140- TAG_NAME="v${{ steps.new_version.outputs.version }}"
141-
142- # Check if tag exists
143- if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
144- echo "Tag $TAG_NAME already exists, deleting and recreating..."
145- git tag -d "$TAG_NAME"
146- git push origin :"$TAG_NAME" || true
147- fi
148-
149- # Create new tag
150- git tag -a "$TAG_NAME" -m "Release version ${{ steps.new_version.outputs.version }}"
151- echo "✅ Created tag: $TAG_NAME"
138+ - name : Authenticate with GitHub App
139+ uses : tibdex/github-app-token@v2.1.0
140+ with :
141+ app_id : ${{ secrets.APP_ID }}
142+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
152143
153144 - name : Push Changes and Tags
154145 run : |
155- git push origin ${{ github.event.pull_request.base.ref }}
156- git push origin v${{ steps.new_version.outputs.version }} --force
146+ NEW_VERSION=${{ steps.new_version.outputs.version }}
147+ git config --global user.name "github-actions"
148+ git config --global user.email "github-actions@users.noreply.github.com"
149+ git tag "v$NEW_VERSION"
150+ git push origin "v$NEW_VERSION"
151+ env :
152+ GITHUB_TOKEN : ${{ secrets.PAT }}
157153
158154 - name : Create GitHub Release
159155 uses : softprops/action-gh-release@v2
@@ -176,4 +172,5 @@ jobs:
176172 - Title: ${{ github.event.pull_request.title }}
177173 - Merged by: @${{ github.event.pull_request.merged_by.login }}
178174 - Build: [View Workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
179- draft : false
175+ draft : false
176+
0 commit comments