Skip to content

Commit 74e9a15

Browse files
committed
#44: Add release-assets workflow
1 parent 224a7a5 commit 74e9a15

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release Assets
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
publish_assets:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: 1.16.x
18+
- name: Build and pack for linux-amd64
19+
run: GOOS=linux GOARCH=amd64 go build -o nmap-formatter && tar -czvf nmap-formatter-linux-amd64.tar.gz nmap-formatter
20+
- name: Build and pack for windows-amd64
21+
run: GOOS=windows GOARCH=amd64 go build -o nmap-formatter.exe && zip nmap-formatter-windows-amd64.zip nmap-formatter.exe
22+
- name: Build and pack for macos-amd64
23+
run: GOOS=darwin GOARCH=amd64 go build -o nmap-formatter && zip nmap-formatter-darwin-amd64.zip nmap-formatter
24+
- name: Release
25+
uses: softprops/action-gh-release@v1
26+
if: startsWith(github.ref, 'refs/tags/')
27+
with:
28+
files: |
29+
nmap-formatter-linux-amd64.tar.gz
30+
nmap-formatter-windows-amd64.zip
31+
nmap-formatter-darwin-amd64.zip

0 commit comments

Comments
 (0)