File tree Expand file tree Collapse file tree 2 files changed +62
-37
lines changed
Expand file tree Collapse file tree 2 files changed +62
-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, main]
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+
35+ - name : Use go ${{ matrix.go }}
36+ uses : actions/setup-go@v2
37+ with :
38+ go-version : ${{ matrix.go }}
39+
40+ - name : Get app version
41+ run : |
42+ echo "GIT_VERSION=`git describe --tags`" >> $GITHUB_ENV
43+
44+ - name : Build
45+ run : |
46+ CGO_ENABLED=1 GOARCH=${{ matrix.arch }} GO111MODULE=on go build \
47+ -o smimesign -ldflags "-X main.versionString=${{ env.GIT_VERSION }}" .
48+ tar czf smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz \
49+ smimesign
50+ env :
51+ TARGET_ARCH : ${{ matrix.arch }}
52+
53+ - name : Run tests
54+ run : GO111MODULE=on go test -v ./...
55+
56+ - name : Release
57+ uses : softprops/action-gh-release@v1
58+ if : startsWith(github.ref, 'refs/tags/') && matrix.go == '1.x'
59+ with :
60+ files : smimesign-${{ env.GIT_VERSION }}-macos-${{ matrix.arch }}.tgz
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments