Skip to content

Update GitHub Actions workflow for building and releasing the app #14

Update GitHub Actions workflow for building and releasing the app

Update GitHub Actions workflow for building and releasing the app #14

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build and Package the app
run: npm run package
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: comet-${{ matrix.os }}
path: out/make/**/*.*
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Artifacts (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/download-artifact@v2
with:
name: comet-ubuntu-latest
path: ./artifacts/ubuntu
- name: Download Artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/download-artifact@v2
with:
name: comet-windows-latest
path: ./artifacts/windows
- name: Download Artifacts (macOS)
if: matrix.os == 'macos-latest'
uses: actions/download-artifact@v2
with:
name: comet-macos-latest
path: ./artifacts/macos
- name: Publish to GitHub Releases
run: npm run publish -- --prerelease
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}