-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.38 KB
/
go-binary-release.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
name: build-go-binary
on:
release:
types: [created] # 表示在创建新的 Release 时触发
permissions:
contents: write
packages: write
jobs:
build-go-binary:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [windows] # 需要打包的系统
goarch: [amd64] # 需要打包的架构
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: install dependencies
run: |
sudo apt-get install gcc-mingw-w64
sudo apt install xorg-dev
go install fyne.io/fyne/v2/cmd/fyne@latest
- name: download icon
run: |
curl -L https://raw.githubusercontent.com/iamsxm/BE5000_SSh_UI/master/xiaomi_icon.png > Icon.png
- name: build release
run: |
export CC=x86_64-w64-mingw32-gcc
rm -rf build
fyne package -os ${{ matrix.goos }}
mkdir -p build/bin
mkdir -p build/release
ls ./
mv BE5000_SSh.exe ./build/bin
mv dropbear ./build/bin
mv dropbearkey ./build/bin
zip -r ./build/release/BE5000_SSh_${{ matrix.goos }}_${{ matrix.goarch }}.zip ./build/bin/*
ls ./build/release/*
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "./build/release/*"