-
Notifications
You must be signed in to change notification settings - Fork 14
99 lines (86 loc) · 3.69 KB
/
release-desktop.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
name: Release desktop wallet
on:
push:
tags: ['alephium-desktop-wallet@[0-9]+.[0-9]+.[0-9]+', 'alephium-desktop-wallet@[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+']
env:
GH_TOKEN: ${{ secrets.github_token }}
ADBLOCK: true
jobs:
release-desktop-wallet:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: 🏗 Setup monorepo
uses: ./.github/actions/setup-monorepo
# macOS
- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
echo '${{ secrets.mac_certs }}' | base64 -d > applecert.p12
- name: Build & release macOS Electron app
if: startsWith(matrix.os, 'macos')
env:
CSC_LINK: ${{ secrets.MAC_CERTS }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLEID: ${{ secrets.APPLE_ID }}
APPLEIDPASS: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
run: |
echo "Enter desktop wallet dir, install deps, build app, package it with electron-builder, and release it"
cd apps/desktop-wallet
pnpm install
pnpm ci:build
pnpm electron-builder --mac --universal --publish always
- name: Upload notarization-error.log
if: always()
uses: actions/upload-artifact@v4
with:
name: notarization-error-log
path: ${{ github.workspace }}/apps/desktop-wallet/notarization-error.log
- name: Skip signing for rc versions
if: contains(github.event.ref, '-rc.')
uses: jaywcjlove/github-action-package@v2.0.0
with:
path: apps/desktop-wallet/package.json
unset: build.win.sign
# Windows
- name: Build & release Windows Electron app
if: startsWith(matrix.os, 'windows')
env:
# Replace WINDOWS_ vars with CSC_ ones if you want to use the code signing tool of electron-builder
# CSC_LINK: ${{ secrets.WINDOW_CERTS }}
# CSC_KEY_PASSWORD: ${{ secrets.WINDOWS_CERTS_PASSWORD }}
# Following vars are needed in the apps/desktop-wallet/.signWindows.js file
WINDOWS_SIGN_USER_NAME: ${{ secrets.WINDOWS_SIGN_USER_NAME }}
WINDOWS_SIGN_PASSWORD: ${{ secrets.WINDOWS_SIGN_PASSWORD }}
WINDOWS_SIGN_CREDENTIAL_ID: ${{ secrets.WINDOWS_SIGN_CREDENTIAL_ID }}
WINDOWS_SIGN_TOTP_SECRET: ${{ secrets.WINDOWS_SIGN_TOTP_SECRET }}
run: |
echo "Enter desktop wallet dir, install deps, build app, package it with electron-builder, and release it"
cd apps/desktop-wallet
pnpm install
pnpm ci:build
pnpm electron-builder --windows --publish always
# Linux
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
if: startsWith(matrix.os, 'ubuntu')
- name: Build & release Linux Electron app
if: startsWith(matrix.os, 'ubuntu')
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
run: |
echo "Enter desktop wallet dir, install deps, build app, package it with electron-builder, and release it"
cd apps/desktop-wallet
pnpm install
pnpm ci:build
pnpm electron-builder --linux --publish always