File tree 2 files changed +66
-37
lines changed 2 files changed +66
-37
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - " v*"
9
+ pull_request :
10
+
11
+ jobs :
12
+ build :
13
+ name : ${{ matrix.friendlyName }} ${{ matrix.arch }} (go ${{ matrix.go }})
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ go : [1.12.x, 1.x, x]
19
+ os : [macos-10.15]
20
+ arch : [amd64, arm64]
21
+ include :
22
+ - os : macos-10.15
23
+ friendlyName : macOS
24
+ # - os: windows-2019
25
+ # friendlyName: Windows
26
+ exclude :
27
+ # For some reason, arm64 doesn't seem to be well supported with go 1.12.x
28
+ - arch : arm64
29
+ go : 1.12.x
30
+ timeout-minutes : 60
31
+ env :
32
+ # Needed for macOS arm64 until hosted macos-11.0 runners become available
33
+ SDKROOT : /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
34
+ steps :
35
+ - uses : actions/checkout@v2
36
+ with :
37
+ submodules : recursive
38
+
39
+ - name : Use go ${{ matrix.go }}
40
+ uses : actions/setup-go@v2
41
+ with :
42
+ go-version : ${{ matrix.go }}
43
+
44
+ - name : Get app version
45
+ run : |
46
+ echo "GIT_VERSION=`git describe --tags`" >> $GITHUB_ENV
47
+
48
+ - name : Build
49
+ run : |
50
+ CGO_ENABLED=1 GOARCH=${{ matrix.arch }} GO111MODULE=on go build \
51
+ -o smimesign -ldflags "-X main.versionString=${{ env.GIT_VERSION }}" .
52
+ tar czf smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz \
53
+ smimesign
54
+ env :
55
+ TARGET_ARCH : ${{ matrix.arch }}
56
+
57
+ - name : Run tests
58
+ run : GO111MODULE=on go test -v ./...
59
+
60
+ - name : Release
61
+ uses : softprops/action-gh-release@v1
62
+ if : startsWith(github.ref, 'refs/tags/') && matrix.go == '1.x'
63
+ with :
64
+ files : smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz
65
+ env :
66
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments