Skip to content

Package Desktop

Package Desktop #61

Workflow file for this run

name: Package Desktop
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
importProject:
description: 'Import hero and platform projects'
required: false
type: boolean
default: false
skipSigning:
description: 'Skip signing the app'
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
app:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable # must come before setup-node
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: actions/setup-python@v5
if: ${{ matrix.os != 'windows-latest' }}
with:
python-version: '3.10'
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Add msbuild to PATH
if: ${{ matrix.os == 'windows-latest' }}
uses: microsoft/setup-msbuild@v2
- name: Add PIP Setuptools
if: ${{ matrix.os == 'windows-latest' }}
run: pip.exe install setuptools
- name: Clone Projects
if: ${{ github.event.inputs.importProject }}
run: |
git clone --depth 1 https://github.com/ulixee/platform.git
git clone --depth 1 --recurse-submodules https://github.com/ulixee/hero.git
cd hero
git submodule update --init --recursive --depth 1
working-directory: ..
- name: Build hero
if: ${{ github.event.inputs.importProject }}
run: yarn build && yarn build:dist
working-directory: ../hero
- name: Build platform
if: ${{ github.event.inputs.importProject }}
run: yarn && yarn build:dist
working-directory: ../platform
- name: Allow yarn to adjust lockfile
run: yarn config set enableImmutableInstalls false
- name: Yarn build
run: yarn --network-timeout 1000000 --no-immutable
- name: Import Platform
if: ${{ github.event.inputs.importProject }}
run: yarn sync:repos:dist && yarn sync:build
- name: Build Project
run: yarn build
- run: mkdir ~/.private_keys && echo "$APPLE_NOTARIZE_KEY" > ~/.private_keys/AuthKey_5VH6PQ3585.p8
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
env:
APPLE_NOTARIZE_KEY: ${{secrets.APPLE_NOTARIZE_KEY}}
- name: Build Desktop
run: yarn electron-builder --publish onTagOrDraft
env:
NODE_ENV: production
USE_HARD_LINKS: false
force_no_cache: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: ${{ github.event.inputs.skipSigning != true }}
CSC_LINK: ${{ matrix.os == 'windows-latest' && secrets.WIN_CSC_LINK || secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ matrix.os == 'windows-latest' && secrets.WIN_CSC_KEY_PASSWORD || secrets.CSC_KEY_PASSWORD }}
APPLE_API_KEY: ~/.private_keys/AuthKey_5VH6PQ3585.p8
APPLE_API_KEY_ID: 5VH6PQ3585
APPLE_API_ISSUER: a89474ed-637f-4cf0-8429-da45ef388882
- name: Upload App
if: startsWith(github.ref, 'refs/tags/v') == false || failure()
uses: actions/upload-artifact@v4
with:
name: desktop-${{ matrix.os }}
path: |
dist/*.AppImage
dist/*.dmg
dist/*.exe
retention-days: 1