diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml index 1d64dbb22..72dcf2bac 100644 --- a/.github/workflows/electron-release.yml +++ b/.github/workflows/electron-release.yml @@ -5,15 +5,12 @@ on: tags: - 'v*' workflow_dispatch: - inputs: - version: - description: 'Version to release (e.g., 0.1.8)' - required: false - default: '' jobs: build-macos: runs-on: macos-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -34,23 +31,16 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build macOS (universal) + - name: Build and Publish macOS (universal) working-directory: ac-electron - run: npx electron-builder --mac --universal + run: npx electron-builder --mac --universal --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload macOS artifacts - uses: actions/upload-artifact@v4 - with: - name: macos-build - path: | - ac-electron/dist/*.dmg - ac-electron/dist/*.zip - retention-days: 5 - build-windows: runs-on: windows-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -66,22 +56,16 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build Windows + - name: Build and Publish Windows working-directory: ac-electron - run: npx electron-builder --win --x64 + run: npx electron-builder --win --x64 --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Windows artifacts - uses: actions/upload-artifact@v4 - with: - name: windows-build - path: | - ac-electron/dist/*.exe - retention-days: 5 - build-linux: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -97,49 +81,8 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build Linux + - name: Build and Publish Linux working-directory: ac-electron - run: npx electron-builder --linux + run: npx electron-builder --linux --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload Linux artifacts - uses: actions/upload-artifact@v4 - with: - name: linux-build - path: | - ac-electron/dist/*.AppImage - ac-electron/dist/*.deb - ac-electron/dist/*.rpm - retention-days: 5 - - release: - needs: [build-macos, build-windows, build-linux] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - permissions: - contents: write - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - name: List artifacts - run: find artifacts -type f -name "*" - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - files: | - artifacts/macos-build/*.dmg - artifacts/macos-build/*.zip - artifacts/windows-build/*.exe - artifacts/linux-build/*.AppImage - artifacts/linux-build/*.deb - artifacts/linux-build/*.rpm - draft: false - prerelease: false - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}