File tree 2 files changed +61
-37
lines changed 2 files changed +61
-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 }}
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ go : [1.12.x, 1.x, master]
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
+ timeout-minutes : 60
27
+ env :
28
+ # Needed for macOS arm64 until hosted macos-11.0 runners become available
29
+ SDKROOT : /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
30
+ steps :
31
+ - uses : actions/checkout@v2
32
+ with :
33
+ submodules : recursive
34
+ - name : Use go ${{ matrix.go }}
35
+ uses : actions/setup-go@v2
36
+ with :
37
+ go-version : ${{ matrix.go }}
38
+
39
+ - name : Get app version
40
+ run : |
41
+ echo "GIT_VERSION=`git describe --tags`" >> $GITHUB_ENV
42
+
43
+ - name : Build
44
+ run : |
45
+ CGO_ENABLED=1 GOARCH=${{ matrix.arch }} GO111MODULE=on go build \
46
+ -o smimesign -ldflags "-X main.versionString=${{ env.GIT_VERSION }}" .
47
+ tar czf smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz \
48
+ smimesign
49
+ env :
50
+ TARGET_ARCH : ${{ matrix.arch }}
51
+
52
+ - name : Run tests
53
+ run : GO111MODULE=on go test -v ./...
54
+
55
+ - name : Release
56
+ uses : softprops/action-gh-release@v1
57
+ if : startsWith(github.ref, 'refs/tags/') && matrix.go == '1.x'
58
+ with :
59
+ files : smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz
60
+ env :
61
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments