mirror of
https://github.com/DeNNiiInc/Advanced-Smtp-Tester.git
synced 2026-04-18 01:45:58 +00:00
- Add explicit 'package' script to package.json to avoid npx issues - Update workflow to use 'npm run package' - Use wildcard path for compression to handle folder naming variations - Add 'ls dist' for debugging
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: Build Desktop App
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build with electron-packager
|
|
run: npm run package
|
|
|
|
- name: Verfiy Build
|
|
run: ls dist
|
|
|
|
- name: Create ZIP archive
|
|
run: Compress-Archive -Path "dist\*-win32-x64" -DestinationPath "Advanced-SMTP-Tester-Windows.zip"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-desktop-app
|
|
path: Advanced-SMTP-Tester-Windows.zip
|
|
retention-days: 30
|
|
|
|
- name: Create Release (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: Advanced-SMTP-Tester-Windows.zip
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|