-
Notifications
You must be signed in to change notification settings - Fork 22
35 lines (29 loc) · 877 Bytes
/
go.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
name: Go
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install Golang
uses: actions/setup-go@v2
with:
go-version: 1.17 # 1.18 后会出现tls: server selected unsupported protocol version 301错误
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
- name: Build && Packet
run: |
go build -v -ldflags '-w -s' -gcflags '-N -l' -o blueming cmd/blueming/main.go
tar -zcvf blueming.tar.gz blueming
- name: Auto Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: Release ${{ steps.date.outputs.date }}
files: |
*.tar.gz