Skip to content

fix: binary file handling #15

fix: binary file handling

fix: binary file handling #15

Workflow file for this run

name: Release and Deploy
on:
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-desktop:
name: Build Desktop on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build renderer and electron bundles for desktop
run: npm --workspace src/web run build
env:
ELECTRON: '1'
- name: Install Linux build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libfuse2
- name: Package desktop app
run: npx electron-builder --config electron-builder.yml --publish=never
- name: Upload desktop installer artifact
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: dist/
retention-days: 1
release:
name: Create GitHub Release
needs: build-desktop
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download all desktop build artifacts
uses: actions/download-artifact@v4
with:
path: dist-all
- name: Display downloaded artifacts structure
run: ls -R dist-all
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
HUSKY: 0
- name: Get the new version number
id: get_version
run: |
NEW_VERSION=$(node -p "require('./package.json').version")
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
deploy-pages:
name: Deploy to GitHub Pages
needs: release
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout correct version
uses: actions/checkout@v4
with:
ref: v${{ needs.release.outputs.version }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build web application
run: npm --workspace src/web run build
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload web artifact for deployment
uses: actions/upload-pages-artifact@v3
with:
path: src/web/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4