File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
name : release-branch
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
tags :
6
7
- ' *.*.*'
@@ -15,11 +16,16 @@ jobs:
15
16
16
17
- name : Get the branch version
17
18
id : get_branch
18
- run : echo ::set-output name=BRANCH::$(echo ${GITHUB_REF/refs\/tags\//#v} | cut -d '.' -f1-2)
19
+ run : |
20
+ BRANCH=${GITHUB_REF/refs\/tags\//}
21
+ if ${{github.event_name == 'workflow_dispatch'}}; then
22
+ BRANCH=$(git describe --abbrev=0 --tags)
23
+ fi
24
+ echo ::set-output name=BRANCH::$(echo ${BRANCH} | cut -d '.' -f1-2 | tr -d 'v')
19
25
20
26
- name : Create a github branch
21
27
uses : peterjgrainger/action-create-branch@v2.0.1
22
28
env :
23
- GITHUB_TOKEN : ${{ secrets.GH_TOKEN_EXTRA }}
29
+ GITHUB_TOKEN : ${{ secrets.HOMEBREW_TAP_GH_TOKEN }}
24
30
with :
25
31
branch : ${{ steps.get_branch.outputs.BRANCH }}
Original file line number Diff line number Diff line change 1
1
name : goreleaser
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
tags :
6
7
- ' *.*.*'
12
13
steps :
13
14
- name : Checkout
14
15
uses : actions/checkout@v2
16
+ with :
17
+ fetch-depth : 0
15
18
16
19
- name : Set up Go
17
20
uses : actions/setup-go@v1
@@ -34,10 +37,17 @@ jobs:
34
37
35
38
- name : Update AWS cli
36
39
uses : chrislennon/action-aws-cli@v1.1
40
+ env :
41
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
37
42
38
43
- name : Get the version
39
44
id : get_version
40
- run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
45
+ run : |
46
+ VERSION=${GITHUB_REF/refs\/tags\//}
47
+ if ${{github.event_name == 'workflow_dispatch'}}; then
48
+ VERSION=$(git describe --abbrev=0 --tags)
49
+ fi
50
+ echo ::set-output name=VERSION::${VERSION}
41
51
42
52
- name : Get the builtvar
43
53
id : get_built
You can’t perform that action at this time.
0 commit comments