-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (45 loc) · 1.97 KB
/
Copy pathgithub-actions-release.yml
File metadata and controls
56 lines (45 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Skuid CLI binary release build
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
env:
QUILL_SIGN_P12: ${{ secrets.SKUID_CLI_SIGNING_CERT }}
QUILL_SIGN_PASSWORD: ${{ secrets.SKUID_CLI_SIGNING_CERT_PASSWORD }}
QUILL_NOTARY_KEY: ${{ secrets.SKUID_CLI_NOTARY_KEY }}
QUILL_NOTARY_KEY_ID: ${{ secrets.SKUID_CLI_NOTARY_KEY_ID }}
QUILL_NOTARY_ISSUER: ${{ secrets.SKUID_CLI_NOTARY_KEY_ISSUER }}
CGO_ENABLED: '0' # necessary for builds to run on alpine linux
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Go Get
run: go get
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -short ./...
- run: GOOS=linux GOARCH=amd64 go build -ldflags="-w -X github.com/skuid/skuid-cli/version.Name=${{ github.ref_name }}" -o skuid_linux_amd64
- run: GOOS=darwin GOARCH=amd64 go build -ldflags="-w -X github.com/skuid/skuid-cli/version.Name=${{ github.ref_name }}" -o skuid_darwin_amd64
- run: GOOS=darwin GOARCH=arm64 go build -ldflags="-w -X github.com/skuid/skuid-cli/version.Name=${{ github.ref_name }}" -o skuid_darwin_arm64
- run: GOOS=windows GOARCH=amd64 go build -ldflags="-w -X github.com/skuid/skuid-cli/version.Name=${{ github.ref_name }}" -o skuid_windows_amd64.exe
- name: Install quill
run: curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b ./
- name: Sign and notarize Intel
run: ./quill sign-and-notarize skuid_darwin_amd64
- name: Sign and notarize M1
run: ./quill sign-and-notarize skuid_darwin_arm64
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
skuid_linux_amd64
skuid_darwin_amd64
skuid_darwin_arm64
skuid_windows_amd64.exe