-
Notifications
You must be signed in to change notification settings - Fork 14
91 lines (79 loc) · 2.66 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
# https://github.com/tauri-apps/tauri-action
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
platform: macos-latest
- target: x86_64-apple-darwin
platform: macos-latest
- target: x86_64-unknown-linux-gnu
platform: ubuntu-20.04
- target: x86_64-pc-windows-msvc
platform: windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
uses: battila7/get-version-action@v2
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'pnpm' # Set this to npm, yarn or pnpm.
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: install dependencies (mac only)
if: matrix.platform == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
- name: bump version
env:
VERSION: '${{ steps.get_version.outputs.version-without-v }}'
run: |
pnpm run bump
# https://tauri.app/v1/guides/distribution/sign-macos
- name: Build Tauri App
uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: WeChatAI-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'WeChatAI v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: --target ${{matrix.target}}