Added status badge #34
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 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 # Allow writing to the repository contents | |
packages: write # Allow publishing packages | |
deployments: write # Allow deploying applications | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 # Use v3 for Node.js setup | |
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@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 # Use v3 for Node.js setup | |
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@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 # Use v3 for Node.js setup | |
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@v2 | |
- 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 |