@@ -19,22 +19,32 @@ jobs:
19
19
node-version : ' 16'
20
20
21
21
- name : Install dependencies
22
- run : npm install
22
+ run : yarn install
23
23
24
- - name : Bump version and push
24
+ - name : Bump version
25
+ run : |
26
+ yarn version --patch --no-commit-hooks --no-git-tag-version
27
+
28
+ - name : Get new version
29
+ id : new_version
30
+ run : echo "NEW_VERSION=$(node -p -e \"require('./package.json').version\")" >> $GITHUB_ENV
31
+
32
+ - name : Commit and push changes
25
33
run : |
26
34
git config user.name "github-actions[bot]"
27
35
git config user.email "github-actions[bot]@users.noreply.github.com"
28
- npm version patch -m "Bump version to %s [skip ci]"
36
+ git add package.json yarn.lock
37
+ git commit -m "Bump version to ${{ env.NEW_VERSION }} [skip ci]"
38
+ git tag "v${{ env.NEW_VERSION }}"
29
39
git push --follow-tags
30
40
31
41
- name : Create a pull request for the new version
32
42
uses : peter-evans/create-pull-request@v5
33
43
with :
34
44
branch : bump-version
35
- commit-message : " Bump version to ${{ steps.bump.outputs.new-version }}"
36
- title : " Bump version to ${{ steps.bump.outputs.new-version }}"
37
- body : " This PR bumps the package version to ${{ steps.bump.outputs.new-version }}."
45
+ commit-message : " Bump version to ${{ env.NEW_VERSION }}"
46
+ title : " Bump version to ${{ env.NEW_VERSION }}"
47
+ body : " This PR bumps the package version to ${{ env.NEW_VERSION }}."
38
48
labels : version-bump
39
49
40
50
notify-users :
44
54
- name : Send notification to users
45
55
run : |
46
56
echo "Sending notification to users about the new version..."
47
- # You can customize this step to send notifications through email, Slack, or other channels.
57
+ # Customize this step to send notifications through email, Slack, or other channels.
0 commit comments