File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Create Bump PR'
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' New version'
8+ required : true
9+
10+ permissions :
11+ contents : write
12+ pull-requests : write
13+
14+ jobs :
15+ bump :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v5
20+ - name : Create new branch
21+ run : |
22+ git config --global user.name 'GitHub Actions'
23+ git config --global user.email '[email protected] ' 24+ git checkout -b chore/bump-version-${{ inputs.version }}
25+ - name : Bump version
26+ run : |
27+ sed -i 's/"version": "[^"]*"/"version": "${{ inputs.version }}"/g' package.json
28+ sed -i 's/"version": "[^"]*"/"version": "${{ inputs.version }}"/g' manifest.webapp
29+ - name : Commit changes
30+ run : |
31+ git add package.json
32+ git add manifest.webapp
33+ git commit -m "chore: Bump version to ${{ inputs.version }}"
34+ - name : Push changes
35+ run : git push origin chore/bump-version-${{ inputs.version }}
36+ env :
37+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ - name : Create Pull Request
39+ run : gh pr create -B master -H chore/bump-version-${{ inputs.version }} --title 'Bump ${{ inputs.version }}' --body 'This PR bumps the version to ${{ inputs.version }}.'
40+ env :
41+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments