-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (75 loc) · 2.48 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
paths-ignore:
- '**.md'
pull_request:
branches: [ "master" ]
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
# - name: Install dependencies
# run: sudo apt update && sudo apt install -y build-essential gcc-multilib gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
- name: Checkout static files
uses: actions/checkout@v3
with:
repository: expiteRz/wiimmfi-room-watcher.static
path: static
- name: Build (Windows amd64)
run: GOOS=windows GOARCH=amd64 go build -v -o wiimmfi-room-watcher.exe
- name: Remove unneeded /static/.git
run: rm -r static/.git -f
shell: bash
- name: Package Windows amd64
uses: actions/upload-artifact@v3
with:
name: wiimmfi-room-watcher-win-amd64
path: |
wiimmfi-room-watcher.exe
static/
- name: Rename former build win amd64
run: mv wiimmfi-room-watcher.exe amd64.exe
- name: Build (Windows 386)
run: GOOS=windows GOARCH=386 go build -o wiimmfi-room-watcher.exe
- name: Package Windows i386
uses: actions/upload-artifact@v3
with:
name: wiimmfi-room-watcher-win-i386
path: |
wiimmfi-room-watcher.exe
static/
- name: Rename former build win i386
run: mv wiimmfi-room-watcher.exe i386.exe
- name: Build (Linux amd64)
run: go build -o wiimmfi-room-watcher
- name: Package Linux amd64
uses: actions/upload-artifact@v3
with:
name: wiimmfi-room-watcher-linux-amd64
path: |
wiimmfi-room-watcher
static/
- name: Rename former build lin amd64
run: mv wiimmfi-room-watcher lamd64
- name: Build (Linux i386)
run: GOARCH=386 go build -o wiimmfi-room-watcher
- name: Package Linux i386
uses: actions/upload-artifact@v3
with:
name: wiimmfi-room-watcher-linux-i386
path: |
wiimmfi-room-watcher
static/
- name: Rename former build lin i386
run: mv wiimmfi-room-watcher li386