diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b717af3..f0d374a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,13 +2,8 @@ name: Build and Release on: push: - branches: - - main tags: - 'v*' - pull_request: - branches: - - main workflow_dispatch: jobs: @@ -32,34 +27,30 @@ jobs: - name: Install dependencies run: npm ci - - name: Build Vite app - run: npm run build - - name: Build Electron app (Windows) if: matrix.os == 'windows-latest' - run: npm run build && electron-builder --win --publish never + run: npx electron-builder --win --publish never env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VITE_API_URL: ${{ secrets.VITE_API_URL }} - name: Build Electron app (macOS) if: matrix.os == 'macos-latest' - run: npm run build && electron-builder --mac --publish never + run: npx electron-builder --mac --publish never env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VITE_API_URL: ${{ secrets.VITE_API_URL }} - name: Build Electron app (Linux) if: matrix.os == 'ubuntu-latest' - run: npm run build && electron-builder --linux --publish never + run: npx electron-builder --linux --publish never env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VITE_API_URL: ${{ secrets.VITE_API_URL }} - name: Upload Windows artifacts if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: windows-installers - path: | - release/*.exe + path: release/*.exe retention-days: 30 - name: Upload macOS artifacts @@ -87,24 +78,17 @@ jobs: name: Create Release needs: build runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') permissions: contents: write steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - - name: Display structure of downloaded files - run: ls -R artifacts - - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: draft: false prerelease: false