-
-
Notifications
You must be signed in to change notification settings - Fork 455
74 lines (72 loc) · 2.53 KB
/
build-base.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
name: Build Heroic, upload artifacts
on:
workflow_call:
inputs:
publish-snap:
required: false
type: boolean
secrets:
workflowToken:
required: true
snapcraftIdEdge:
required: false
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- name: Build Windows Portable version
run: pnpm dist:win portable
if: runner.os == 'Windows'
- name: Build macOS x64 & arm64 versions
run: pnpm dist:mac --x64 --arm64 --publish=never
env:
GITHUB_TOKEN: ${{ secrets.workflowToken }}
GH_TOKEN: ${{ secrets.workflowToken }}
CSC_IDENTITY_AUTO_DISCOVERY: false
if: runner.os == 'macOS'
- name: Build and publish Snap version
run: |
sudo apt-get install --no-install-recommends -y snapcraft
pnpm dist:linux Snap --publish=always
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.snapcraftIdEdge }}
if: runner.os == 'Linux' && inputs.publish-snap
- name: Build AppImage version
run: pnpm dist:linux AppImage --x64 --arm64 --publish=never
if: runner.os == 'Linux'
- name: Upload built version
uses: actions/upload-artifact@v4
with:
name: ${{ (matrix.os == 'windows-2022' && 'win-portable' ) ||
(matrix.os == 'macos-13' && 'mac-x64' ) ||
(matrix.os == 'ubuntu-22.04' && 'linux-AppImage-x64') }}
path: ${{ (matrix.os == 'windows-2022' && 'dist/Heroic*.exe' ) ||
(matrix.os == 'macos-13' && 'dist/Heroic*x64.dmg' ) ||
(matrix.os == 'ubuntu-22.04' && 'dist/Heroic*x86_64.AppImage') }}
retention-days: 14
if-no-files-found: error
compression-level: 3
- name: Upload linux ARM version
uses: actions/upload-artifact@v4
with:
name: linux-AppImage-arm64
path: dist/Heroic*arm64.AppImage
retention-days: 14
if-no-files-found: error
compression-level: 3
if: runner.os == 'Linux'
- name: Upload macOS ARM version
uses: actions/upload-artifact@v4
with:
name: mac-arm64
path: dist/Heroic*arm64.dmg
retention-days: 14
if-no-files-found: error
compression-level: 3
if: runner.os == 'macOS'