-
Notifications
You must be signed in to change notification settings - Fork 1
162 lines (136 loc) · 4.27 KB
/
release.yaml
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
162
name: release-desktop-app
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.9.0
- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.18.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
working-directory: apps/desktop
run: turbo build
create-draft-release:
runs-on: ubuntu-latest
environment: "Production – umami-v2"
permissions:
contents: write
issues: write
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create Draft Release for ${{ github.ref_name }}
run: gh release create ${{ github.ref_name }} --draft --title "${{ github.ref_name }}" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
create-release-linux:
runs-on: ubuntu-latest
needs: [build, create-draft-release]
permissions:
contents: write
environment: "Production – umami-v2"
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.9.0
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.18.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Build project
working-directory: apps/desktop
run: turbo build
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: ${{ secrets.GPG_KEY_ID }}
git_user_signingkey: true
- name: Generate deb and rpm files
working-directory: apps/desktop
env:
CI: false
run: pnpm electron:package:linux -p never
- name: Sign the deb and rpm files using dpkg-sig and rpm-sign
working-directory: apps/desktop
run: |
sudo apt install -y dpkg-sig
dpkg-sig --sign builder -k ${{ secrets.GPG_KEY_ID }} ./dist/*.deb
echo "%_gpg_name ${{ secrets.GPG_KEY_ID }}" > ~/.rpmmacros
rpm --addsign ./dist/*.rpm
- name: Upload deb and rpm files
working-directory: apps/desktop
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.ref_name }} ./dist/*.deb ./dist/*.rpm
create-release-mac:
runs-on: macos-latest
needs: [build, create-draft-release]
environment: "Production – umami-v2"
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.9.0
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.18.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Build project
working-directory: apps/desktop
run: turbo build
- name: Build and sign mac app
working-directory: apps/desktop
env:
CI: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
run: pnpm run electron:package:mac