Skip to content

Commit f718b6c

Browse files
authored
Try to use github expressions to only release certain branches (#5)
1 parent 52c3e7a commit f718b6c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/actions/release_to_prod/action.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@ description: "Pretend this released to production"
44
runs:
55
using: "composite"
66
steps:
7-
- name: Do some release stuff
7+
- name: Do some release stuff for main
8+
if: github.ref == 'refs/heads/main'
89
run: |
9-
echo "this is the release script"
10+
echo "this is the release script for main"
11+
shell: bash
12+
13+
14+
- name: Do some release stuff for a hotfix
15+
if: contains(github.ref, 'hotfix')
16+
run: |
17+
echo "this is the release script for a HOTFIX"
18+
shell: bash
19+
20+
- name: Warn about other branches
21+
if: !contains(github.ref, 'hotfix') && github.ref != 'refs/head/main'
22+
run: |
23+
echo "Can only release main or hotfix"
1024
shell: bash

0 commit comments

Comments
 (0)