Skip to content

Fixing action

Fixing action #23

Workflow file for this run

name: Build Electron App
on:
push:
tags:
- 'v*' # This will trigger the workflow on any tag push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Set the GITHUB_TOKEN globally
permissions:
contents: write
releases: write

Check failure on line 13 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build Electron App

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 13, Col: 3): Unexpected value 'releases'
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install
- name: Build Linux AppImage
run: |
npm run build:linux
- name: Upload Linux AppImage
uses: actions/upload-artifact@v4
with:
name: jg-desktop-linux
path: dist/*.AppImage
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install
- name: Build Windows Packages
run: |
npm run build:win
- name: Upload Windows Installer
uses: actions/upload-artifact@v4
with:
name: jg-desktop-windows
path: dist/*.exe
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install
- name: Build macOS Packages
run: |
npm run build:mac
- name: Upload macOS Package
uses: actions/upload-artifact@v4
with:
name: jg-desktop-macos
path: dist/*.dmg
create-release:
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download Linux AppImage
uses: actions/download-artifact@v4
with:
name: jg-desktop-linux
path: ./dist
- name: Download Windows Installer
uses: actions/download-artifact@v4
with:
name: jg-desktop-windows
path: ./dist
- name: Download macOS Package
uses: actions/download-artifact@v4
with:
name: jg-desktop-macos
path: ./dist
- name: Set GH_TOKEN for GitHub CLI
run: echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref }} --title "${{ github.ref }}" --notes "Release for ${{ github.ref }}" \
dist/*.AppImage dist/*.exe dist/*.dmg
- name: Upload Linux AppImage to Release
run: |
gh release upload ${{ github.ref }} dist/*.AppImage --clobber
- name: Upload Windows Installer to Release
run: |
gh release upload ${{ github.ref }} dist/*.exe --clobber
- name: Upload macOS Package to Release
run: |
gh release upload ${{ github.ref }} dist/*.dmg --clobber