Skip to content

Commit d2451d5

Browse files
authored
Merge pull request #13 from oxy/gh-actions-final
Use GitHub actions to upload release artifacts
2 parents 35cb31e + 1a2e7d5 commit d2451d5

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
release:
3+
types:
4+
- created
5+
6+
name: Build Release
7+
jobs:
8+
release:
9+
name: Build release packages
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
goos: [linux, darwin]
15+
goarch: [amd64, arm64]
16+
17+
env:
18+
GOOS: ${{ matrix.goos }}
19+
GOARCH: ${{ matrix.goarch }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- uses: actions/setup-go@v2
25+
with:
26+
go-version: '^1.15'
27+
28+
- run: go build -v -o cloud-agent-$GOOS-$GOARCH
29+
30+
- run: gh release upload $(echo $GITHUB_REF | cut -d/ -f3) ./cloud-agent-$GOOS-$GOARCH
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)