-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
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: 8 | ||
|
||
#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/[email protected]/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 }} |
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
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