-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.63 KB
/
test.yml
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
name: Build silta cli binary and attach to test release
on:
push:
branches: [ feature/* ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
tests-matrix:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: azure/setup-helm@v3
with:
version: 'v3.6.3'
name: Install Helm
- name: Add wunderio Helm repo
run: helm repo add wunderio https://storage.googleapis.com/charts.wdr.io
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.1
- name: Run tests
run: go test -v ./tests
releases-matrix:
name: Cross compile and release Go Binaries
runs-on: ubuntu-latest
needs: tests-matrix
strategy:
matrix:
# Release unsigned darwin binaries
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- name: Set output
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
release_tag: test
overwrite: true
goversion: "https://go.dev/dl/go1.19.1.linux-amd64.tar.gz"
binary_name: "silta"
ldflags: "-X github.com/wunderio/silta-cli/internal/common.Version=${{ steps.vars.outputs.sha_short }} -s -w"