Skip to content

Commit 2864a81

Browse files
committed
Actions: Open a PR after each release to bump the patch version.
1 parent e056c61 commit 2864a81

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,25 @@ jobs:
8787
# Get the `vsix_path` and `ref_name` from the `prepare-artifacts` step above.
8888
asset_path: ${{ steps.prepare-artifacts.outputs.vsix_path }}
8989
asset_name: ${{ format('vscode-codeql-{0}.vsix', steps.prepare-artifacts.outputs.ref_name) }}
90-
asset_content_type: application/zip
90+
asset_content_type: application/zip
91+
92+
- name: Bump patch version
93+
id: bump-patch-version
94+
if: success()
95+
run: |
96+
cd extensions/ql-vscode
97+
# Bump to the next patch version. Major or minor version bumps will have to be done manually.
98+
# Record the next version number as an output of this step.
99+
NEXT_VERSION="$(npm version patch)"
100+
echo "::set-output name=next_version::$NEXT_VERSION"
101+
102+
- name: Create version bump PR
103+
uses: peter-evans/create-pull-request@7531167f24e3914996c8d5110b5e08478ddadff9 # v1.8.0
104+
if: success()
105+
with:
106+
token: ${{ secrets.GITHUB_TOKEN }}
107+
commit-message: Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
108+
title: Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
109+
body: This PR was automatically generated by the GitHub Actions release workflow in this repository.
110+
branch: ${{ format('version/bump-to-{0}', steps.bump-patch-version.outputs.next_version) }}
111+
branch-suffix: none

0 commit comments

Comments
 (0)