File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,35 @@ description: "Pretend this released to production"
44runs :
55 using : " composite"
66 steps :
7+ - name : print out stuff
8+ # on pr
9+ # echo "${{github.ref}}" -> refs/pull/7/merge
10+ # echo "${{github.head_ref}}" -> jblock/gh-debug-1 # but this is only available on `pull_request`, not release
11+ # echo "${{github.ref_name}}" -> 7/merge
12+ # git rev-parse --abbrev-ref HEAD -> HEAD
13+ run : |
14+ echo "${{github.ref}}"
15+ echo "${{github.head_ref}}"
16+ echo "${{github.ref_name}}"
17+ git rev-parse --abbrev-ref HEAD
18+ git branch --show-current
19+ shell : bash
20+
721 - name : Do some release stuff for main
8- if : github.ref == 'refs/heads/ main'
22+ if : github.ref == 'main'
923 run : |
1024 echo "this is the release script for main"
1125 shell : bash
1226
1327
1428 - name : Do some release stuff for a hotfix
15- if : contains(github.ref , 'hotfix') == true
29+ if : contains(github.head_ref , 'hotfix') == true
1630 run : |
1731 echo "this is the release script for a HOTFIX"
1832 shell : bash
1933
2034 - name : Warn about other branches
21- if : contains(github.ref , 'hotfix') == false && github.ref != 'refs/head/ main'
35+ if : contains(github.head_ref , 'hotfix') == false && github.head_ref != 'main'
2236 run : |
2337 echo "Can only release main or hotfix"
2438 shell : bash
Original file line number Diff line number Diff line change 11name : Release
22
33on :
4+ # pull_request:
5+ # branches:
6+ # - '*'
7+
48 release :
59 types : [published]
610 paths-ignore :
You can’t perform that action at this time.
0 commit comments