Skip to content

Commit 971e672

Browse files
authored
Merge pull request #22 from JoShMiQueL/update-bump-action
commit: refactor: update version bump workflow to use pull requests instead of direct push
2 parents 57a258f + a98a803 commit 971e672

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/bump-version.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ permissions:
44
contents: write
55
pull-requests: write
66
packages: write
7-
security-events: write # Required for CodeQL to upload results
87

9-
108
on:
119
workflow_dispatch:
1210
inputs:
@@ -72,26 +70,31 @@ jobs:
7270
with:
7371
fetch-depth: 0
7472

73+
- name: Create branch
74+
run: |
75+
branch_name="bump/${{ needs.prepare.outputs.next_version }}"
76+
git checkout -b $branch_name
77+
7578
- name: Bump package
7679
run: |
7780
git config --global user.email "[email protected]"
7881
git config --global user.name "GitHub Actions"
7982
npm version ${{ inputs.bump_type }} --no-git-tag-version
8083
git add package.json
8184
git commit -m "chore: bump version to ${{ needs.prepare.outputs.next_version }}"
85+
git push origin $branch_name
8286
83-
- name: Initialize CodeQL
84-
uses: github/codeql-action/init@v3
87+
- name: Create Pull Request
88+
uses: peter-evans/create-pull-request@v6
8589
with:
86-
languages: javascript
87-
88-
- name: Perform CodeQL Analysis
89-
uses: github/codeql-action/analyze@v3
90-
with:
91-
upload: true
92-
93-
- name: Push changes
94-
run: git push
90+
title: "chore: bump version to ${{ needs.prepare.outputs.next_version }}"
91+
body: |
92+
Automated version bump to ${{ needs.prepare.outputs.next_version }}
93+
94+
This PR was automatically created by the version bump workflow.
95+
branch: bump/${{ needs.prepare.outputs.next_version }}
96+
base: main
97+
labels: bump
9598

9699
release-draft:
97100
needs: [prepare, bump-package]

0 commit comments

Comments
 (0)