-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (75 loc) · 2.5 KB
/
energy-build-package_windows.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
name: Energy Build and Package Windows
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
jobs:
windows-64:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ windows-2019 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
# 创建基础环境目录 - 不修改
- name: Config Base Environment
run: |
mkdir D:/app
mkdir D:/app/install
shell: bash
# 安装 energy cli - 不修改
- name: Install ENERGY CLI
run: |
cd D:/app
git clone https://github.com/energye/energy.git
cd energy/cmd/energy
go install
energy cli -v
shell: bash
# windows 64 安装开发环境, --cef=109 版本号改成你使用的
- name: Install ENERGY CEF 109-64
run: |
cd D:/app
energy install --all --cef=109
energy env
shell: bash
# cli 编译和打包, -o -f 改成你自己的
- name: Build and Package AMD64
run: |
cd $RUNNER_WORKSPACE/demo-actions
energy build -o="demo-amd64.exe"
energy package -f="demo-amd64.exe" -o="demo-windows64.exe" -c
mv "$RUNNER_WORKSPACE/demo-actions/build/windows/demo-windows64.exe" D:/app/install
shell: bash
# windows 32 安装开发环境, --cef=109 版本号改成你使用的
- name: Install ENERGY CEF 109-32
run: |
cd D:/app
energy install --all --cef=109 --arch=386
energy env
shell: bash
# cli 编译和打包, -o -f 改成你自己的
- name: Build and Package 32
run: |
cd $RUNNER_WORKSPACE/demo-actions
energy build -o="demo-32.exe" --arch="386"
energy package -f="demo-32.exe" -o="demo-windows32.exe" -c
mv "$RUNNER_WORKSPACE/demo-actions/build/windows/demo-windows32.exe" D:/app/install
shell: bash
- name: Build and Package END
run: |
ls -al D:/app/install/
shell: bash
# 发布版本自动上传到发布版本, 不需要修改, 但需要配置 GITHUB_TOKEN
- name: Release Dynamic library
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: D:/app/install/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}