forked from l3lackShark/gosumemory
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.97 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Go
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: self-hosted
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: rsrc -arch=amd64 -ico ./out.ico -o gosumemory.syso && CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -v -o win64/gosumemory.exe && rm gosumemory.syso && rsrc -arch=386 -ico ./out.ico -o gosumemory.syso && CC=i686-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -v -o win32/gosumemory.exe && rm gosumemory.syso && CC=gcc go build -v -o lin64/gosumemory && CC=gcc CGO_ENABLED=1 GOARCH=386 go build -v -o lin32/gosumemory
- name: Clone deps
run: git clone https://github.com/l3lackShark/static && find win32 win64 lin32 lin64 -maxdepth 0 -exec cp -rf static {} \;
- name: Upload win32
uses: actions/[email protected]
with:
# Artifact name
name: gosumemory_windows_386
# Directory containing files to upload
path: ./win32
- name: Upload win64
uses: actions/[email protected]
with:
# Artifact name
name: gosumemory_windows_amd64
# Directory containing files to upload
path: ./win64
- name: Upload lin32
uses: actions/[email protected]
with:
# Artifact name
name: gosumemory_linux_386
# Directory containing files to upload
path: ./lin32
- name: Upload lin64
uses: actions/[email protected]
with:
# Artifact name
name: gosumemory_linux_amd64
# Directory containing files to upload
path: ./lin64