IS-82.00 #2158
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-latest | |
steps: | |
- uses: actions/checkout@v3 | |
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 |