-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (108 loc) · 3.73 KB
/
package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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