-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (31 loc) · 1.26 KB
/
publish.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
name: Publish
on:
push:
tags:
- "*.*.*"
- "*.*.*-test"
jobs:
publish:
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Install gox
run: go install github.com/mitchellh/gox@v1.0.1
- name: Compile binaries with gox
run: ${{ env.GOPATH }}/bin/gox -osarch="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose
- name: Publish release with artifacts
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.GOPATH }}/src/github.com/${{ github.repository }}/gosurf_linux_amd64
${{ env.GOPATH }}/src/github.com/${{ github.repository }}/gosurf_linux_arm64
${{ env.GOPATH }}/src/github.com/${{ github.repository }}/gosurf_darwin_amd64
${{ env.GOPATH }}/src/github.com/${{ github.repository }}/gosurf_darwin_arm64
${{ env.GOPATH }}/src/github.com/${{ github.repository }}/gosurf_windows_amd64.exe