-
Notifications
You must be signed in to change notification settings - Fork 60
52 lines (44 loc) · 1.2 KB
/
main.yaml
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
name: main
on: [push, pull_request]
jobs:
test:
env:
LATEST_GO: 1.19.x # version used for release
strategy:
matrix:
go: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
name: ${{ matrix.os }}/go${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go test -race -v ./...
- run: make e2e
- run: make release GOARCHES="amd64 arm arm64 mips mipsle mips64 mips64le"
- name: Upload binary artifacts
uses: actions/upload-artifact@v3
if: matrix.go == env.LATEST_GO
with:
name: binaries
path: |
wesher-*
wesher.sha256sums
release:
name: release
needs: test
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'costela/wesher'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: binaries
- uses: softprops/action-gh-release@v0.1.14
with:
fail_on_unmatched_files: true
files: |
wesher-*
wesher.sha256sums