33
33
uses : actions/checkout@v4
34
34
with :
35
35
fetch-depth : 0
36
+ token : ${{ secrets.WORKFLOW_PAT }}
37
+ persist-credentials : false
36
38
37
39
- name : Setup Node
38
40
uses : actions/setup-node@v4
@@ -53,23 +55,33 @@ jobs:
53
55
fi
54
56
echo "resolved=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
55
57
56
- - name : Bump versions and commit
58
+ - name : Resolve version
57
59
env :
58
60
INPUT_VERSION : ${{ steps.resolve_version.outputs.resolved }}
59
61
run : |
60
- git config user.name "github-actions[bot]"
61
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
62
62
node ./scripts/release/version.js "$INPUT_VERSION"
63
63
RESOLVED_VERSION=$(jq -r .version package.json)
64
- git commit -am "chore: release v$RESOLVED_VERSION"
65
- git push origin HEAD
64
+ echo "RESOLVED_VERSION=$RESOLVED_VERSION" >> "$GITHUB_ENV"
65
+
66
+ - name : Set git identity (Actions bot)
67
+ run : |
68
+ git config user.name "github-actions[bot]"
69
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
70
+
71
+ - name : Commit & push
72
+ uses :
actions-js/[email protected]
73
+ with :
74
+ github_token : ${{ secrets.WORKFLOW_PAT }}
75
+ branch : ${{ github.ref_name }}
76
+ message : ' chore: release v${{ env.RESOLVED_VERSION }}'
66
77
67
78
- name : Build
68
79
run : yarn build
69
80
70
81
- name : Tag and create GitHub release
71
82
env :
72
83
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
84
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73
85
run : |
74
86
VERSION=$(jq -r .version package.json)
75
87
git tag -a "v$VERSION" -m "Release v$VERSION"
0 commit comments