File tree 2 files changed +22
-30
lines changed
2 files changed +22
-30
lines changed Original file line number Diff line number Diff line change 1
- name : Continuous Deployment
2
-
3
- on :
4
- push :
5
- tags :
6
- - " *"
7
-
8
- permissions :
9
- contents : write
10
-
1
+ on : [push, pull_request]
2
+ name : Test, Build and Publish
11
3
jobs :
4
+ tests :
5
+ strategy :
6
+ matrix :
7
+ os : [ubuntu-latest, macos-latest]
8
+ runs-on : ${{ matrix.os }}
9
+ steps :
10
+ - uses : actions/checkout@v3
11
+ - uses : actions/setup-go@v3
12
+ with :
13
+ go-version : " 1.20.x"
14
+ - name : Run tests
15
+ run : go test -race ./...
16
+
12
17
goreleaser :
13
- name : Publish release to github/brew
18
+ name : Build and Publish
19
+ needs : tests
14
20
runs-on : ubuntu-latest
21
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
15
22
steps :
16
23
- name : Checkout
17
24
uses : actions/checkout@v3
@@ -31,15 +38,15 @@ jobs:
31
38
GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
32
39
33
40
check_brew :
34
- name : Check brew tap has been updated
35
- runs-on : macos-latest
41
+ name : Check Brew Tap
36
42
needs : goreleaser
43
+ runs-on : macos-latest
37
44
steps :
38
- - name : brew tap/install
45
+ - name : Install gitmux with brew
39
46
run : |
40
47
brew tap arl/arl
41
48
brew install gitmux
42
49
gitmux -V
43
- - name : check gitmux version
50
+ - name : Check installed gitmux version
44
51
run : |
45
52
[ v$(gitmux -V) == "$GITHUB_REF_NAME" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments