diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml new file mode 100644 index 0000000..36fe743 --- /dev/null +++ b/.github/workflows/electron-release.yml @@ -0,0 +1,54 @@ +name: Electron Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + build-and-publish: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: linux + - os: windows-latest + target: win + - os: macos-latest + target: mac + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build and publish Electron app + run: pnpm electron:publish:${{ matrix.target }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload dist artifacts + uses: actions/upload-artifact@v4 + with: + name: electron-${{ matrix.target }} + path: dist-electron + if-no-files-found: error diff --git a/package.json b/package.json index caab505..217ed25 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,12 @@ "linux": { "target": ["AppImage"], "category": "Utility" + }, + "publish": { + "provider": "github", + "owner": "SrIzan10", + "repo": "helium", + "releaseType": "release" } } }