-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.9 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
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
on:
push:
tags:
- "v*"
branches: [main]
paths:
- "versionHelper.go"
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Make build folder
run: mkdir build
- name: ls debug
run: ls -a && pwd
- name: Build for Windows (amd64)
run: |
cd cmd/client && env GOOS=windows GOARCH=amd64 go build -o /home/runner/work/wowtools/wowtools/build/wowtools_client.exe
cd ../server && env GOOS=windows GOARCH=amd64 go build -o /home/runner/work/wowtools/wowtools/build/wowtools_server.exe
- name: Build for Linux (amd64)
run: cd cmd/server && env GOOS=linux GOARCH=amd64 go build -o /home/runner/work/wowtools/wowtools/build/wowtools_server
# Go Tests are acting up due to the W32 module - I've disabled all the tests but it still spits errors out. Disabling for now as these are all local tests anyways
#- name: Test
#run: go test -v ./...
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: WoWTools-AMD64
path: |
build/wowtools_client.exe
build/wowtools_server.exe
build/wowtools_server
LICENSE
README.md
config.yaml
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Download Windows Artifacts
uses: actions/download-artifact@v2
with:
name: WoWTools-AMD64
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
LICENSE
README.md
build/wowtools_client.exe
build/wowtools_server.exe
build/wowtools_server
config.yaml