Skip to content

Workflow file for this run

name: Build and Release Electron App
on:
push:
branches:
- main # This triggers the workflow on pushes to the main branch
permissions:
contents: write # This is necessary for creating releases and uploading release assets
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: yarn install
- name: Build Electron app
run: yarn build:linux
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: electron-app
path: dist/*.deb
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: electron-app
path: ./dist
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ github.ref }}
release_name: Release for ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/*.deb
asset_name: "orkestrator.deb"