forked from vertex-app/vertex
-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (103 loc) · 2.95 KB
/
build-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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build Windows
on:
workflow_dispatch:
push:
branches:
- windows
paths:
- version.py
jobs:
build_windows:
runs-on: windows-latest
outputs:
output1: ${{ steps.get_version.outputs.KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'Vertex'
- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: 14.21.3
- name: Install Dependencies
id: get_version
run: |
ls
cd Vertex
$version = Get-Content "./version.py"
echo "KEY=$version" >> $env:GITHUB_OUTPUT
ls
Remove-Item -Path .\webui -Recurse -Force
cd app
Copy-Item -Path "./config/sql.db" -Destination "./db"
ls
echo =============
cd ..
ls
npm i --save-dev
# cd webui
# npm i --legacy-peer-deps --save-dev
#- name: build
# run: |
# mkdir webui
# ls
# mv ./Vertex/app/static/* ./webui/
# cd webui
# ls
- name: Install Inno Setup Compiler
uses: pwall2222/inno-setup-download@v0.0.4
- name: COPY NODE
run: |
mkdir Node14
cd Node14
Copy-Item -Path "C:\hostedtoolcache\windows\node\14.21.3\x64\*" -Destination .
ls
- name: 拉取exe代码
uses: actions/checkout@v3
with:
token: ${{ secrets.PRIVATE_REPO_TOKEN }}
ref: master
repository: ${{ secrets.REPO }}
ssh-key: ${{ secrets.DEPLOY_KEY }}
path: 'Inno-Setup-Vertex'
- name: Compile Inno Setup Script
run: |
echo ====
ls
cd Inno-Setup-Vertex
Copy-Item -Path ".\ChineseSimplified.isl" -Destination "C:\Users\runneradmin\AppData\Local\Temp\inno\Languages"
echo "${{ steps.get_version.outputs.KEY }}"
iscc "/DMyAppVersion=${{ steps.get_version.outputs.KEY }}" build.iss
- name: Upload windows file
uses: actions/upload-artifact@v3
with:
name: windows
path: .\Inno-Setup-Vertex\exe\build\*.exe
Create-release:
permissions: write-all
runs-on: ubuntu-latest
needs: [ build_windows ]
steps:
- name: Download exe
uses: actions/download-artifact@v3
- name: Create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT1: ${{needs.build_windows.outputs.output1}}
with:
tag_name: ${{needs.build_windows.outputs.output1}}
release_name: ${{needs.build_windows.outputs.output1}}
body: ${{ github.event.commits[0].message }}
draft: false
prerelease: false
- name: Upload release asset
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: |
./windows/