-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·40 lines (33 loc) · 1 KB
/
build.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
40
name: Go
on:
push:
tags:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build
run: go build
- name: Prepare files for release
run: |
touch shaker_${{github.ref_name}}_linux-amd64.tar.gz
mkdir shaker_${{github.ref_name}}_linux-amd64
mv shaker shaker_${{github.ref_name}}_linux-amd64/
tar -czf shaker_${{github.ref_name}}_linux-amd64.tar.gz --exclude='./.*' --exclude=shaker_${{github.ref_name}}_linux-amd64.tar.gz shaker_${{github.ref_name}}_linux-amd64
- uses: ncipollo/[email protected]
with:
name: Shaker_release_${{github.ref_name}}
artifacts: "shaker_${{github.ref_name}}_linux-amd64.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}