File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ jobs:
1313 runs-on : ubuntu-latest
1414 permissions :
1515 contents : write
16- id-token : write
1716
1817 steps :
1918 - uses : actions/checkout@v3
2019 with :
2120 ref : main
2221 fetch-depth : 0
22+ token : ${{ secrets.PAT_TOKEN }} # PAT for checkout and push
2323
2424 - name : Validate version format
2525 run : |
4242 fi
4343
4444 echo "✓ Version tag does not exist yet"
45-
46- - name : Generate GitHub App token
47- id : generate_token
48- uses : tibdex/github-app-token@v2
49- with :
50- app_id : ${{ secrets.APP_ID }}
51- private_key : ${{ secrets.APP_PRIVATE_KEY }}
5245
5346 - name : Update version and create tag
5447 run : |
6558 # Create tag
6659 git tag -a "v${{ github.event.inputs.version }}" -m "Release v${{ github.event.inputs.version }}"
6760
68- # Push changes using the app token
69- git remote set-url origin "https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git"
70-
71- # Only push to main if there were changes
72- git diff --quiet HEAD origin/main || git push origin main
61+ # Push changes (PAT is already configured from checkout)
62+ git push origin main || echo "No changes to push to main"
7363
74- # Always push the tag
64+ # Push the tag - this will trigger build.yml automatically
7565 git push origin "v${{ github.event.inputs.version }}"
You can’t perform that action at this time.
0 commit comments