-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (90 loc) · 2.71 KB
/
desktop.yml
File metadata and controls
106 lines (90 loc) · 2.71 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
name: Build Desktop
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
build_linux:
description: 'Build Linux'
type: boolean
default: true
build_windows:
description: 'Build Windows'
type: boolean
default: true
create_release:
description: 'Create draft release'
type: boolean
default: true
jobs:
build-linux:
if: github.event_name == 'push' || inputs.build_linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://npm.pkg.github.com
scope: '@satvisorcom'
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- run: npx tauri build --bundles deb,appimage
- uses: actions/upload-artifact@v4
with:
name: linux-artifacts
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
build-windows:
if: github.event_name == 'push' || inputs.build_windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://npm.pkg.github.com
scope: '@satvisorcom'
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
- run: npx tauri build --bundles nsis,msi
- uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: |
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/msi/*.msi
release:
if: always() && (github.event_name == 'push' || inputs.create_release) && !failure() && !cancelled()
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: true
files: |
artifacts/linux-artifacts/**/*
artifacts/windows-artifacts/**/*