|
33 | 33 | with: |
34 | 34 | token: ${{ secrets.WORKFLOW_PAT }} |
35 | 35 | fetch-depth: 0 |
| 36 | + persist-credentials: false |
36 | 37 |
|
37 | 38 | - name: Setup Node |
38 | 39 | uses: actions/setup-node@v4 |
@@ -61,28 +62,12 @@ jobs: |
61 | 62 | RESOLVED_VERSION=$(jq -r .version package.json) |
62 | 63 | echo "RESOLVED_VERSION=$RESOLVED_VERSION" >> "$GITHUB_ENV" |
63 | 64 |
|
64 | | - - name: Set git identity (Actions bot) |
65 | | - run: | |
66 | | - git config user.name "github-actions[bot]" |
67 | | - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
68 | | - - name: Sanity check PAT identity |
69 | | - env: |
70 | | - WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }} |
71 | | - run: | |
72 | | - curl -sSf -H "Authorization: Bearer $WORKFLOW_PAT" https://api.github.com/user | jq -r .login |
73 | | -
|
74 | | - - name: Set remote to use PAT |
75 | | - env: |
76 | | - WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }} |
77 | | - run: | |
78 | | - git remote set-url origin "https://x-access-token:${WORKFLOW_PAT}@github.com/${{ github.repository }}.git" |
79 | | - git ls-remote origin 1>/dev/null |
80 | | -
|
81 | | - - name: Commit and push |
82 | | - run: | |
83 | | - git add -A |
84 | | - git commit -m "chore: release v${RESOLVED_VERSION}" |
85 | | - git push origin "HEAD:${GITHUB_REF_NAME}" |
| 65 | + - name: Commit & push with PAT |
| 66 | + uses: actions-js/push@v1.4 |
| 67 | + with: |
| 68 | + github_token: ${{ secrets.WORKFLOW_PAT }} |
| 69 | + branch: ${{ github.ref_name }} |
| 70 | + message: 'chore: release v${{ env.RESOLVED_VERSION }}' |
86 | 71 |
|
87 | 72 | # - name: Bump versions and commit |
88 | 73 | # env: |
|
0 commit comments