Skip to content

Commit 6449a99

Browse files
authored
- add .github/workflows/push.yml
1 parent c214fd6 commit 6449a99

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/push.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: golang-build-actions-workflow
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
env:
12+
targetZip: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: '1.17.5' # The Go version to download (if necessary) and use.
20+
21+
- run: go get .
22+
23+
- run: go build
24+
25+
- name: Archive Release
26+
uses: thedoctor0/zip-release@master
27+
with:
28+
type: 'zip'
29+
path: ${{ github.event.repository.name }}.exe
30+
filename: "${{ env.targetZip }}"
31+
32+
- name: Release prebuilt
33+
uses: ncipollo/release-action@v1
34+
with:
35+
artifacts: "${{ env.targetZip }}"
36+
allowUpdates: true
37+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)