Repository navigation
177 lines (149 loc) · 5.25 KB
/
Copy pathrelease.yml
File metadata and controls
177 lines (149 loc) · 5.25 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-x86_64:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
xdg-utils
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- run: npm ci
- run: npm run fetch:runtime
- run: npm run build
- run: npm run tauri build
- name: Install appimagetool
run: |
ARCH="$(uname -m)"
wget -q -O /tmp/appimagetool.AppImage \
"https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage"
chmod +x /tmp/appimagetool.AppImage
sudo mv /tmp/appimagetool.AppImage "/usr/local/bin/appimagetool-${ARCH}"
sudo ln -sf "/usr/local/bin/appimagetool-${ARCH}" /usr/local/bin/appimagetool
- name: Fix AppImage for Mesa 25+ / Ubuntu 26.04 WebKit crash
run: |
shopt -s nullglob
chmod +x scripts/fix-appimage.sh scripts/verify-appimage-icon.sh scripts/ensure-appimage-icons.sh
for artifact in src-tauri/target/release/bundle/appimage/*.AppImage; do
./scripts/fix-appimage.sh "$artifact"
done
- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
output-file: sbom.spdx.json
- name: Install cosign
uses: sigstore/cosign-installer@v3.7.0
- name: Sign AppImage artifacts
env:
COSIGN_EXPERIMENTAL: "1"
run: |
shopt -s nullglob
for artifact in src-tauri/target/release/bundle/appimage/*.AppImage; do
cosign sign-blob --yes "$artifact" --output-signature "${artifact}.sig"
done
- uses: actions/upload-artifact@v7
with:
name: cotux-x86_64
path: |
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/appimage/*.AppImage.sig
sbom.spdx.json
build-aarch64:
runs-on: ubuntu-24.04-arm
continue-on-error: true
steps:
- uses: actions/checkout@v7
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
xdg-utils
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- run: npm ci
- run: npm run fetch:runtime
- run: npm run validate:runtime
- run: npm run build
- run: npm run tauri build
- name: Install appimagetool
run: |
ARCH="$(uname -m)"
wget -q -O /tmp/appimagetool.AppImage \
"https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage"
chmod +x /tmp/appimagetool.AppImage
sudo mv /tmp/appimagetool.AppImage "/usr/local/bin/appimagetool-${ARCH}"
sudo ln -sf "/usr/local/bin/appimagetool-${ARCH}" /usr/local/bin/appimagetool
- name: Fix AppImage for Mesa 25+ / Ubuntu 26.04 WebKit crash
run: |
shopt -s nullglob
chmod +x scripts/fix-appimage.sh scripts/verify-appimage-icon.sh scripts/ensure-appimage-icons.sh
for artifact in src-tauri/target/release/bundle/appimage/*.AppImage; do
./scripts/fix-appimage.sh "$artifact"
done
- uses: actions/upload-artifact@v7
with:
name: cotux-aarch64
path: |
src-tauri/target/release/bundle/appimage/*.AppImage
github-release:
needs: [build-x86_64, build-aarch64]
if: ${{ needs.build-x86_64.result == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v7
with:
path: dist
merge-multiple: true
- name: Prepare release assets
run: |
mkdir -p release-assets
find dist -type f \( -name '*.AppImage' -o -name '*.AppImage.sig' -o -name 'sbom.spdx.json' \) -exec cp {} release-assets/ \;
cp scripts/run-cotux.sh release-assets/
chmod +x release-assets/run-cotux.sh
ls -lh release-assets/
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') }}
generate_release_notes: false
fail_on_unmatched_files: false
body_path: docs/releases/${{ github.ref_name }}.md
files: release-assets/*