-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (73 loc) · 2.75 KB
/
main.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
name: 'publish'
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'ubuntu-latest'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.settings.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: install webkit2gtk (ubuntu only)
if: matrix.settings.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: '20.10.0'
node-version-file: '.node-version'
cache: 'pnpm' # Set this to npm, yarn or pnpm.
- name: Install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # Change this to npm, yarn or pnpm.
- name: Build the app
id: build_app
uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_GITHUB_INSTALL_URL: ${{ secrets.VITE_GITHUB_INSTALL_URL }}
VITE_GITHUB_STATE: ${{ secrets.VITE_GITHUB_STATE }}
VITE_GITHUB_SCOPE: ${{ secrets.VITE_GITHUB_SCOPE }}
VITE_GITHUB_CLIENT_ID: ${{ secrets.VITE_GITHUB_CLIENT_ID }}
VITE_GITHUB_CLIENT_SECRET: ${{ secrets.VITE_GITHUB_CLIENT_SECRET }}
VITE_GITHUB_REDIRECT_URI: ${{ secrets.VITE_GITHUB_REDIRECT_URI }}
VITE_GITHUB_PRIVATE_KEY: ${{ secrets.VITE_GITHUB_PRIVATE_KEY }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ""
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'v__VERSION__'
releaseBody: 'Please refer to [CHANGELOG.md](https://github.com/picx-dev/picx-app/blob/main/CHANGELOG.md) for details.'
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.args }}