automatically merge to release branch when version number is incremen… #1
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
on: | ||
push: | ||
branches: | ||
- main | ||
name: Update release branch if version incremented | ||
jobs: | ||
Release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check if version bumped in package.json | ||
run: '[ "$(git blame -l package.json | grep '"version":' | cut -d " " -f 1)" = "$(git rev-parse HEAD)" ]' | ||
- name: Merge to release branch | ||
run: 'git branch -f release && git push -f origin release' |