name: Build and Release on: push: branches: - main tags: - 'v*' workflow_dispatch: jobs: build-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '22' cache: 'npm' - run: npm install - run: npm ci - run: npx electron-builder --linux --publish never - uses: actions/upload-artifact@v4 with: name: linux-builds path: | dist/*.AppImage dist/*.deb build-windows: runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '22' cache: 'npm' - run: npm install - run: npm ci - run: npx electron-builder --win --publish never - uses: actions/upload-artifact@v4 with: name: windows-builds path: | dist/*.exe build-macos: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '22' cache: 'npm' - run: npm install - run: npm ci - run: npx electron-builder --mac --publish never - uses: actions/upload-artifact@v4 with: name: macos-builds path: | dist/*.dmg dist/*.zip dist/latest-mac.yml release: needs: [build-linux, build-windows, build-macos] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' permissions: contents: write steps: - 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@v2 with: tag_name: ${{ github.ref_type == 'tag' && github.ref_name || 'manual-' + github.sha }} name: ${{ github.ref_type == 'tag' && github.ref_name || 'Manual build ' + github.sha }} files: | artifacts/linux-builds/**/* artifacts/windows-builds/**/* artifacts/macos-builds/**/* generate_release_notes: true draft: false prerelease: false