Skip to content

Commit 22c21c7

Browse files
committed
Create Github Action
1 parent 74ae559 commit 22c21c7

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
jobs:
6+
releases-matrix:
7+
name: Release Go Binary
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
12+
goos: [linux, windows, darwin]
13+
goarch: ["386", amd64, arm64]
14+
exclude:
15+
- goarch: "386"
16+
goos: darwin
17+
- goarch: arm64
18+
goos: windows
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: wangyoucao577/go-release-action@v1
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
goos: ${{ matrix.goos }}
25+
goarch: ${{ matrix.goarch }}
26+
binary_name: "netmon"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
!README.md
1818
!LICENSE
19+
!*.yml
1920

2021
# !Makefile
2122

0 commit comments

Comments
 (0)