Develop #44
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: Version bump | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: ["master"] | |
jobs: | |
bump-minor-version-on-master: | |
name: Bump the version on master | |
if: github.event.pull_request.merged == true | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest #self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Automated Version Bump | |
uses: phips28/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
skip-push: true # skip push so that we can force push | |
version-type: 'minor' | |
target-branch: 'master' | |
commit-message: 'CI: bumped version to {{version}} because a pull request was merged into master' | |
- name: force-push | |
run: | |
git push origin master --force | |
merge-master-into-develop: | |
name: Merge master into develop | |
needs: bump-minor-version-on-master # has to be run after the push to master | |
if: github.event.pull_request.merged == true | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest #self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: everlytic/[email protected] | |
with: | |
github_token: ${{ github.token }} | |
source_ref: 'master' | |
target_branch: 'develop' | |
commit_message_template: 'CI: Merged {source_ref} into target {target_branch} after version bump' | |