-
Notifications
You must be signed in to change notification settings - Fork 4
126 lines (107 loc) · 4.23 KB
/
desktop-release.yml
File metadata and controls
126 lines (107 loc) · 4.23 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
name: Release Desktop App
on:
push:
tags:
- "desktop-v*"
permissions:
contents: write
jobs:
build-release:
name: Build Desktop App (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
artifact: keyless-desktop-macos-aarch64
- os: macos-latest
target: x86_64-apple-darwin
artifact: keyless-desktop-macos-x86_64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: keyless-desktop-windows-x86_64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: keyless-desktop-linux-x86_64
steps:
- uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"
cache-dependency-path: keyless-desktop/pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev libx11-dev libxi-dev libxtst-dev libxrandr-dev libxext-dev libxrender-dev libxfixes-dev libxcomposite-dev libxcursor-dev libxdo-dev pkg-config
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install frontend deps
run: pnpm -C keyless-desktop install --frozen-lockfile
- name: Build desktop (release)
run: pnpm -C keyless-desktop tauri build --target ${{ matrix.target }}
- name: Prepare bundle artifacts
shell: bash
run: |
mkdir -p bundle-artifacts
# Copy installer files from the bundle directory (Tauri outputs to target/${{ matrix.target }}/release/bundle/)
if [ -d "target/${{ matrix.target }}/release/bundle" ]; then
# Copy DMG files (macOS)
cp target/${{ matrix.target }}/release/bundle/dmg/*.dmg bundle-artifacts/ 2>/dev/null || true
# Copy MSI files (Windows)
cp target/${{ matrix.target }}/release/bundle/msi/*.msi bundle-artifacts/ 2>/dev/null || true
# Copy DEB files (Linux)
cp target/${{ matrix.target }}/release/bundle/deb/*.deb bundle-artifacts/ 2>/dev/null || true
# Copy RPM files (Linux)
cp target/${{ matrix.target }}/release/bundle/rpm/*.rpm bundle-artifacts/ 2>/dev/null || true
# Copy AppImage files (Linux)
cp target/${{ matrix.target }}/release/bundle/appimage/*.AppImage bundle-artifacts/ 2>/dev/null || true
fi
ls -lh bundle-artifacts/ || echo "No bundle artifacts found"
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.artifact }}
path: bundle-artifacts/**
if-no-files-found: warn
release:
name: Create Desktop App Release
needs: build-release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v5
- name: Download all artifacts
uses: actions/download-artifact@v5
with:
path: artifacts
- name: Find and prepare release files
shell: bash
run: |
mkdir -p release-files
find artifacts -type f \( -name "*.dmg" -o -name "*.msi" -o -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" \) -exec cp {} release-files/ \;
ls -lh release-files/
- name: Create Desktop App release
uses: softprops/action-gh-release@v2
with:
name: keyless ${{ github.ref_name }}
body: |
## keyless Desktop Release
Desktop application version of keyless with GUI.
Download the installer for your platform:
- Linux: `.deb` or `.rpm` package
- macOS: `.dmg` installer
- Windows: `.msi` installer
files: release-files/*
draft: false
prerelease: false