-
Notifications
You must be signed in to change notification settings - Fork 24
65 lines (52 loc) · 2.06 KB
/
main.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
name: Build Check
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Set up Go 1.21.5
uses: actions/setup-go@v5
with:
go-version: '>=1.17.0'
id: go
- name: mod tidy
run: go mod tidy -v
- name: check basic
run: cd examples/basic;windres -i ui/ui.rc -O coff -o ui.syso
- name: build basic
run: cd examples/basic;go generate -v;go build -ldflags="-s -w -H windowsgui" -v
- name: check simple
run:
cd examples/simple;
windres -i emptyProject/Debug/resource.res -O coff -o vsui.syso;
go build -ldflags="-s -w -H windowsgui"
# 取消 winres调用。 生成的资源文件会变成乱码,暂时不知道如果解决。 发布 wowjump release之前需要手动生成 ui.syso.
# windres -i ui/ui.rc -O coff -o ui.syso;
- name: check wowjump
run:
cd examples/wowjump;
go generate;
go build -ldflags="-s -w -H windowsgui"
- name: Pre-release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'whtiehack/wingui'
run: |
mkdir release
Compress-Archive -CompressionLevel Optimal -Force -Path examples/basic/basic.exe,examples/basic/bitmap.jpg -DestinationPath release/basic.zip
Compress-Archive -CompressionLevel Optimal -Force -Path examples/simple/simple.exe -DestinationPath release/simple.zip
Compress-Archive -CompressionLevel Optimal -Force -Path examples/wowjump/wowjump.exe -DestinationPath release/wowjump.zip
- name: Draft Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'whtiehack/wingui'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
release/basic.zip
release/simple.zip
release/wowjump.zip
draft: true