-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (99 loc) · 3.24 KB
/
release.yml
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
name: Release And Upload
on:
release:
types:
- published
jobs:
build-and-upload:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup pNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 21
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies for Tauri (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Load cached node_modules
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
- name: Load cached Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install dependencies
run: pnpm install
- name: Build the app
run: pnpm tauri build
- name: (.dmg) Upload files to a GitHub release
if: matrix.os == 'macos-latest'
uses: svenstaro/[email protected]
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file_glob: true
tag: ${{ github.ref }}
file: src-tauri/target/release/bundle/*/*.dmg
- name: (.msi) Upload files to a GitHub release
if: matrix.os == 'windows-latest'
uses: svenstaro/[email protected]
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file_glob: true
tag: ${{ github.ref }}
file: src-tauri/target/release/bundle/*/*.msi
- name: (.deb) Upload files to a GitHub release
if: matrix.os == 'ubuntu-latest'
uses: svenstaro/[email protected]
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file_glob: true
tag: ${{ github.ref }}
file: src-tauri/target/release/bundle/*/*.deb
- name: (.AppImage) Upload files to a GitHub release
if: matrix.os == 'ubuntu-latest'
uses: svenstaro/[email protected]
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file_glob: true
tag: ${{ github.ref }}
file: src-tauri/target/release/bundle/*/*.AppImage