Skip to content

Build Windows

Build Windows #24

Workflow file for this run

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/