Skip to content

desktop-prerelease

desktop-prerelease #5

name: desktop-prerelease
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: build-${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: win
build_script: dist:win
- os: macos-latest
target: mac
build_script: dist:mac
- os: ubuntu-latest
target: linux
build_script: dist:linux
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: python -m pip install --upgrade uv
- name: Verify uv
run: uv --version
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Install desktop dependencies
working-directory: desktop
run: npm install
- name: Build desktop artifacts
working-directory: desktop
run: npm run ${{ matrix.build_script }}
- name: Upload Windows installer
if: matrix.target == 'win'
uses: actions/upload-artifact@v4
with:
name: deeplab-${{ matrix.target }}
path: desktop/dist/*.exe
if-no-files-found: error
- name: Upload macOS installer
if: matrix.target == 'mac'
uses: actions/upload-artifact@v4
with:
name: deeplab-${{ matrix.target }}
path: desktop/dist/*.dmg
if-no-files-found: error
- name: Upload Linux installers
if: matrix.target == 'linux'
uses: actions/upload-artifact@v4
with:
name: deeplab-${{ matrix.target }}
path: |
desktop/dist/*.AppImage
desktop/dist/*.deb
if-no-files-found: error
release:
name: publish-prerelease
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release-assets
- name: Publish GitHub pre-release
uses: softprops/action-gh-release@v2
with:
tag_name: pre-${{ github.run_id }}
name: DeepLab Desktop Pre-release ${{ github.run_number }}
draft: true
prerelease: false
generate_release_notes: true
files: release-assets/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}