-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (73 loc) · 2.54 KB
/
Copy pathrelease.yml
File metadata and controls
86 lines (73 loc) · 2.54 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, ubuntu-22.04-arm, windows-latest, macos-14]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: krillnotes-desktop/package-lock.json
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ". -> target"
- name: Install Linux system dependencies
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
xdg-utils
- name: Install frontend dependencies
working-directory: krillnotes-desktop
run: npm ci
- name: Build release
uses: tauri-apps/tauri-action@action-v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: krillnotes-desktop
tagName: ${{ github.ref_name }}
releaseName: "Krillnotes ${{ github.ref_name }}"
releaseBody: |
See the assets below to download this version and install it on your platform.
releaseDraft: true
prerelease: false
- name: Fix AppImage .DirIcon symlink (workaround for tauri-apps/tauri#15110)
if: startsWith(matrix.platform, 'ubuntu')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ARCH=$(uname -m)
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage" \
-O appimagetool
chmod +x appimagetool
for appimage in target/release/bundle/appimage/*.AppImage; do
[ -f "$appimage" ] || continue
echo "Fixing $appimage..."
"$appimage" --appimage-extract
ln -sf Krillnotes.png squashfs-root/.DirIcon
APPIMAGE_EXTRACT_AND_RUN=1 ./appimagetool --comp zstd squashfs-root "$appimage"
rm -rf squashfs-root
done
rm -f appimagetool
gh release upload "${{ github.ref_name }}" \
target/release/bundle/appimage/*.AppImage --clobber