-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (71 loc) · 2.31 KB
/
Copy pathrelease.yml
File metadata and controls
86 lines (71 loc) · 2.31 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:
include:
- os: ubuntu-latest
label: linux
- os: windows-latest
label: windows
- os: macos-latest
label: macos
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
run_install: false
- name: Cache cargo registry and build
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release-
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libkrb5-dev
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install krb5
- name: Set macOS Kerberos paths
if: runner.os == 'macOS'
run: |
echo "CFLAGS=-I$(brew --prefix krb5)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix krb5)/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$(brew --prefix krb5)/lib/pkgconfig" >> $GITHUB_ENV
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Run Rust tests
working-directory: src-tauri
run: cargo test
- name: Build and release with Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: DSPanel ${{ github.ref_name }}
releaseBody: |
See the [CHANGELOG](https://github.com/Rwx-G/DSPanel/blob/main/CHANGELOG.md) for details.
releaseDraft: false
prerelease: false