Skip to content

Commit 029c7c2

Browse files
committed
automatically merge to release branch when version number is incremented, hopefully
1 parent 3b1735a commit 029c7c2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: Update release branch if version incremented
7+
jobs:
8+
Release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Check if version bumped in package.json
13+
run: '
14+
[
15+
"$(git blame -l package.json | grep "\"version\":" | cut -d " " -f 1)"
16+
=
17+
"$(git rev-parse HEAD)"
18+
] &&
19+
git branch -f release &&
20+
git push -f origin release
21+
'

0 commit comments

Comments
 (0)