|
| 1 | +name: Windows Release Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + - '[0-9]+.[0-9]+.[0-9]+' |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: write |
| 12 | + |
| 13 | +jobs: |
| 14 | + build-windows: |
| 15 | + name: Build Windows Packages |
| 16 | + runs-on: windows-latest |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Checkout repository |
| 20 | + uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Setup Node.js |
| 23 | + uses: actions/setup-node@v4 |
| 24 | + with: |
| 25 | + node-version: '20' |
| 26 | + cache: 'npm' |
| 27 | + |
| 28 | + - name: Install dependencies |
| 29 | + run: npm ci |
| 30 | + |
| 31 | + - name: Build application |
| 32 | + run: npm run build |
| 33 | + |
| 34 | + - name: Build Windows packages |
| 35 | + run: npm run electron:build |
| 36 | + env: |
| 37 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 38 | + |
| 39 | + - name: List built artifacts |
| 40 | + run: | |
| 41 | + Write-Host "Contents of dist directory:" |
| 42 | + Get-ChildItem -Path dist -Filter "EasyEdit-*" | Format-Table Name, Length |
| 43 | +
|
| 44 | + - name: Upload artifacts to release |
| 45 | + uses: softprops/action-gh-release@v2 |
| 46 | + if: startsWith(github.ref, 'refs/tags/') |
| 47 | + with: |
| 48 | + files: | |
| 49 | + dist/EasyEdit-Setup-*.exe |
| 50 | + dist/EasyEdit-Setup-*.msi |
| 51 | + dist/EasyEdit-Portable-*.exe |
| 52 | + dist/EasyEdit-Portable-*.zip |
| 53 | + fail_on_unmatched_files: false |
| 54 | + generate_release_notes: true |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + |
| 58 | + - name: Upload build artifacts for debugging |
| 59 | + uses: actions/upload-artifact@v4 |
| 60 | + with: |
| 61 | + name: windows-packages |
| 62 | + path: | |
| 63 | + dist/EasyEdit-Setup-*.exe |
| 64 | + dist/EasyEdit-Setup-*.msi |
| 65 | + dist/EasyEdit-Portable-*.exe |
| 66 | + dist/EasyEdit-Portable-*.zip |
| 67 | + retention-days: 30 |
0 commit comments