Build Windows App #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows App | |
on: | |
release: | |
types: [prereleased] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.16.0" | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
#TODO - Remove this once https://github.com/electron-userland/electron-builder/issues/6933#issuecomment-1213438889 is resolved | |
- name: Tweak pnpm.cjs | |
run: sed -i 's/\/usr\/bin\/env node/node/g' /c/Users/runneradmin/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/pnpm.cjs | |
shell: bash | |
- name: Download and extract libsimple | |
run: | | |
curl -L https://github.com/wangfenjin/simple/releases/latest/download/libsimple-windows-x64.zip -o libsimple.zip | |
Expand-Archive libsimple.zip -DestinationPath . -Force | |
$libsimple_dir = Get-ChildItem -Directory | Where-Object { $_.Name -like "libsimple*" } | Select-Object -First 1 | |
if ($libsimple_dir) { | |
Move-Item $libsimple_dir.FullName dist-simple | |
} else { | |
New-Item -ItemType Directory -Name dist-simple | |
Move-Item libsimple* dist-simple/ | |
} | |
# rename simple.dll to libsimple.dll | |
Rename-Item -Path "dist-simple/simple.dll" -NewName "libsimple.dll" | |
Get-ChildItem -Recurse dist-simple | |
shell: pwsh | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build application | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: pnpm run build:desktop | |
- name: Build without Signing | |
run: pnpm run pkg:desktop | |
- name: List dist-app contents | |
run: Get-ChildItem -Path dist-app -Force | |
- name: Update Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
dist-app/*.exe | |
dist-app/*.zip | |
dist-app/latest*.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |