name: Build Electron Windows App on: push: branches: - main - master paths: - 'windows-app/**' - '.github/workflows/build-electron-app.yml' workflow_dispatch: permissions: contents: write actions: read jobs: build-windows: name: Build Electron App (Windows) runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' - name: Install dependencies run: npm install working-directory: windows-app - name: Build Electron app run: npm run build:win working-directory: windows-app env: BACKEND_BASE_URL: ${{ secrets.BACKEND_BASE_URL }} - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: name: plugin-compass-electron-windows path: windows-app/dist/*.exe retention-days: 7 - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: plugin-compass-desktop-${{ github.sha }} release_name: Plugin Compass Desktop ${{ github.sha }} draft: false prerelease: false - name: Upload Release Asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: windows-app/dist/Plugin Compass Setup 0.1.0.exe asset_name: Plugin-Compass-Setup-0.1.0.exe asset_content_type: application/octet-stream