forked from Gavinpub/ws
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.15 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
name: Go
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.5
- name: Cache
uses: actions/cache@v3
with:
path: |
/home/runner/.cache/go-build/
/home/runner/go/pkg/mod/
key: GO_MOD_CACHE
- name: Requirements
run: sudo apt-get install upx-ucl
- name: Build
run: ./build.sh
- name: Upload a Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build_artifacts
path: |
ws
push:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: build_artifacts
- name: Draft new release and upload assets
env:
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}
run: |
gh release create "$(git branch --show-current)-$(git rev-parse --short HEAD)" ./ws