-
Notifications
You must be signed in to change notification settings - Fork 4
123 lines (99 loc) · 3.47 KB
/
build-version.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build version
on:
push:
tags:
- v*
env:
NR_LICENCE: ${{ secrets.NR_LICENCE }}
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: ls D:/a/lunii-admin/lunii-admin/bindings/windows/lib
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"
cache: true
- name: Set up Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@master
- name: Build
working-directory: ./cmd/app
env:
CGO_LDFLAGS: "-LD:/a/lunii-admin/lunii-admin/bindings/windows/lib"
CGO_CFLAGS: "-ID:/a/lunii-admin/lunii-admin/bindings/windows/include"
run: |
wails build -skipbindings -o lunii-admin_windows_amd64.exe -ldflags "-v '-extldflags=-static -lm' -X main.NR_LICENCE=${env:NR_LICENCE} -X main.version=$(git describe --tags --abbrev=0)"
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
replacesArtifacts: true
artifacts: "build/bin/lunii-admin_windows_amd64.exe"
token: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Linux Wails deps
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu
- run: sudo apt install libmp3lame-dev
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"
cache: true
- name: Set up Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@master
- name: Build
working-directory: ./cmd/app
run: wails build -ldflags "-X main.NR_LICENCE=$NR_LICENCE -X main.version=$(git describe --tags --abbrev=0)" -skipbindings -o lunii-admin_linux_amd64
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
replacesArtifacts: true
artifacts: "build/bin/lunii-admin_linux_amd64"
token: ${{ secrets.GITHUB_TOKEN }}
build-macos-amd:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# LAme is installed, but we want to remove the dynamic lib
- name: Delete dynamic version of Lame
run: rm /usr/local/opt/lame/lib/libmp3lame.0.dylib
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"
cache: true
- name: Set up Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@master
- name: Build
working-directory: ./cmd/app
run: wails build -ldflags "-X main.NR_LICENCE=$NR_LICENCE -X main.version=$(git describe --tags --abbrev=0)" -skipbindings
- name: Create Zip
run: ditto -c -k --sequesterRsrc --keepParent build/bin/lunii-admin.app lunii-admin_darwin_amd64.zip
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
replacesArtifacts: true
artifacts: "lunii-admin_darwin_amd64.zip"
token: ${{ secrets.GITHUB_TOKEN }}