feat: add release job to create GitHub release #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release App | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: x64 | |
- os: ubuntu-latest | |
arch: arm64 | |
- os: windows-latest | |
arch: x64 | |
- os: macos-latest | |
arch: x64 | |
- os: macos-latest | |
arch: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Set version | |
run: npm version ${{ github.ref_name }} --no-git-tag-version | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Frontend | |
run: npm run build | |
- name: Package App | |
run: npx electron-builder --publish never --${{ matrix.arch }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Artifacts-${{ runner.os }}-${{ matrix.arch }} | |
path: | | |
release-builds/*.msi | |
release-builds/*.zip | |
release-builds/*.deb | |
release-builds/*.rpm | |
release-builds/*.dmg | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Stream Monitor ${{ github.ref_name }} | |
draft: true | |
files: | | |
artifacts/*.msi | |
artifacts/*.zip | |
artifacts/*.deb | |
artifacts/*.rpm | |
artifacts/*.dmg |