Skip to content

Package Desktop

Package Desktop #53

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:
permissions:
contents: write
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: Enable Corepack
if: ${{ matrix.os == 'windows-latest' }}
run: corepack enable
- 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: List packages
run: ls -la packages && ls -lart node_modules/@ulixee
shell: bash
- name: Build Project
run: yarn build
- run: |
mkdir ~/.private_keys
echo "$APPLE_NOTARIZE_KEY" > ~/.private_keys/AuthKey_27VRA75WCS.p8
chmod 600 ~/.private_keys/AuthKey_27VRA75WCS.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
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 }}"
DEBUG: electron-notarize:*
- 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