Skip to content

Commit 513d763

Browse files
authored
Merge pull request #187 from adityasharad/actions/bump-version-after-release
Actions: Open a PR after each release to bump the patch version.
2 parents e056c61 + ee30c31 commit 513d763

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ out/
77
server/
88
node_modules/
99
gen/
10+
artifacts/
1011

1112
# Integration test artifacts
1213
**/.vscode-test/**

0 commit comments

Comments
 (0)