-
Notifications
You must be signed in to change notification settings - Fork 24
38 lines (31 loc) · 1.13 KB
/
version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Bump version
on:
pull_request_target:
types: [closed]
branches: [dev]
jobs:
bump-version:
# this job will only run if the PR has been merged
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }} # with this we can bypass branch protection rules here (no-push)
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Setup git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Bump version number
run: |
# this just prints the new version number - will not update any files
NEW_VERSION=$(tools/cicd/build/version-next.sh)
# auto-increment version number upon merging pull requests
tools/cicd/build/bump.sh --apply
# create commit
git add source/frontend/package.json source/backend/api/Pims.Api.csproj
git commit -m "CI: Bump version to v${NEW_VERSION}"
git push