-
-
Notifications
You must be signed in to change notification settings - Fork 174
161 lines (155 loc) · 4.88 KB
/
deploy.yml
File metadata and controls
161 lines (155 loc) · 4.88 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
# SPDX-License-Identifier: CC0-1.0
name: Deploy
on:
push:
tags:
- '**'
permissions:
contents: write
jobs:
linux:
name: Linux
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.4.0
with:
node-version-file: .node-version
- name: Install Dependencies
run: |
sudo apt install libx11-dev libxtst-dev libwayland-dev libxkbcommon-dev
npm install
- name: Fix Permissions
# Workaround for https://github.com/electron/electron/issues/17972
run: |
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
sudo chown root node_modules/electron/dist/chrome-sandbox
- name: Create Packages
run: |
npm run make
- name: Create AppImage
run: |
tools/make-app-image.sh
- name: Upload Packages
uses: svenstaro/upload-release-action@2.9.0
with:
file: out/make/**/*
tag: ${{ github.ref }}
file_glob: true
prerelease: true
windows:
name: Windows
strategy:
matrix:
os: [windows-2022, windows-11-arm]
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.4.0
with:
node-version-file: .node-version
- name: Install Dependencies
run: |
npm install
- name: Create Release
run: |
npm run make
- name: Rename Executables
shell: pwsh
env:
MATRIX_OS: ${{ matrix.os }}
run: |
if ($env:MATRIX_OS -eq "windows-2022") {
Get-ChildItem -Path out/make/squirrel.windows/*/*.exe | Rename-Item -NewName { $_.BaseName + "-x64" + $_.Extension }
} elseif ($env:MATRIX_OS -eq "windows-11-arm") {
Get-ChildItem -Path out/make/squirrel.windows/*/*.exe | Rename-Item -NewName { $_.BaseName + "-arm64" + $_.Extension }
}
- name: Upload Unsigned Artifacts
id: upload-unsigned-artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-unsigned
path: |
out/make/zip/win32/*/*
out/make/squirrel.windows/*/*.exe
retention-days: 7
- name: Sign with SignPath
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '4e74932d-7987-4337-9219-893ea21bd691'
project-slug: 'kando'
signing-policy-slug: 'test-signing '
github-artifact-id: '${{ steps.upload-unsigned-artifacts.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'out/make/signed'
- name: Upload Zip
uses: svenstaro/upload-release-action@2.9.0
with:
file: out/make/signed/*.zip
tag: ${{ github.ref }}
file_glob: true
prerelease: true
- name: Upload Squirrel Installer
uses: svenstaro/upload-release-action@2.9.0
with:
file: out/make/signed/*.exe
tag: ${{ github.ref }}
file_glob: true
prerelease: true
macos:
name: macOS
strategy:
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
# https://github.com/electron/forge/issues/2807
- run: python3 -m pip install setuptools --break-system-packages
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.4.0
with:
node-version-file: .node-version
- name: Install Dependencies
run: |
npm install
npm install appdmg
- name: Add macOS certificates
env:
OSX_CERTIFICATE: ${{ secrets.OSX_CERTIFICATE }}
OSX_CERTIFICATE_PASSWORD: ${{ secrets.OSX_CERTIFICATE_PASSWORD }}
run: |
.github/osx_certificates.sh
- name: Create Release
env:
KANDO_OSX_SIGN: true
KANDO_OSX_NOTARIZE: true
OSX_APP_SPECIFIC_ID: ${{ secrets.OSX_APP_SPECIFIC_ID }}
OSX_APP_SPECIFIC_PASSWORD: ${{ secrets.OSX_APP_SPECIFIC_PASSWORD }}
OSX_TEAM_ID: ${{ secrets.OSX_TEAM_ID }}
run: |
npm run make
- name: Upload DMG
uses: svenstaro/upload-release-action@2.9.0
with:
file: out/make/*.dmg
tag: ${{ github.ref }}
file_glob: true
prerelease: true
- name: Upload Zip
uses: svenstaro/upload-release-action@2.9.0
with:
file: out/make/zip/darwin/**/*.zip
tag: ${{ github.ref }}
file_glob: true
prerelease: true