58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Windows Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'electron-app/package.json'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
# Node 20 should be preinstalled on the Windows host runner; skipping setup-node avoids 7zip download issues.
|
|
- name: Verify Node.js
|
|
run: node -v
|
|
|
|
- name: Install electron-app dependencies
|
|
working-directory: electron-app
|
|
run: npm ci
|
|
|
|
- name: Create production .env file
|
|
working-directory: electron-app
|
|
run: |
|
|
echo "WS_URL=${{ secrets.WS_URL }}" > .env
|
|
echo "API_URL=${{ secrets.API_URL }}" >> .env
|
|
echo "NODE_ENV=production" >> .env
|
|
|
|
- name: Build TypeScript
|
|
working-directory: electron-app
|
|
run: npm run build
|
|
|
|
- name: Build Windows portable executable (skip signing)
|
|
working-directory: electron-app
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
run: npx electron-builder --win portable --config electron-builder.yml
|
|
|
|
- name: Get version from package.json
|
|
id: version
|
|
working-directory: electron-app
|
|
run: node scripts/get-version.cjs
|
|
|
|
- name: Create Release and Upload exe
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: v${{ steps.version.outputs.VERSION }}
|
|
name: rmtPocketWatcher v${{ steps.version.outputs.VERSION }}
|
|
draft: false
|
|
prerelease: false
|
|
files: electron-app/release/rmtPocketWatcher-*.exe
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|