@@ -4,13 +4,11 @@ name: Auto Bump Version
44on :
55 push :
66 branches :
7- # - '*'
8- # - '*/*'
9- # - '**'
107 - ' main'
118
129permissions :
13- contents : write
10+ contents : write
11+ pull-requests : write
1412
1513jobs :
1614 bump :
@@ -33,13 +31,28 @@ jobs:
3331 working-directory : MyMusicClientSveltePwa
3432 run : npm version patch --no-git-tag-version
3533
36- - name : Commit and push version bump
37- working-directory : MyMusicClientSveltePwa
34+ - name : Configure Git
3835 run : |
3936 git config user.name "github-actions[bot]"
4037 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41- git add package.json package-lock.json
38+
39+ - name : Commit version bump
40+ run : |
41+ git add MyMusicClientSveltePwa/package.json MyMusicClientSveltePwa/package-lock.json
4242 git commit -m "chore: bump version"
43- git push
44- env :
45- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ echo "BRANCH_NAME=version-bump-$(date +%s)" >> $GITHUB_ENV
44+
45+ - name : Create new branch and push
46+ run : |
47+ git checkout -b ${{ env.BRANCH_NAME }}
48+ git push origin ${{ env.BRANCH_NAME }}
49+
50+ - name : Create Pull Request
51+ uses : peter-evans/create-pull-request@v5
52+ with :
53+ token : ${{ secrets.GITHUB_TOKEN }}
54+ commit-message : " chore: bump version"
55+ title : " chore: bump version"
56+ body : " This PR bumps the version automatically."
57+ branch : ${{ env.BRANCH_NAME }}
58+ base : main
0 commit comments