Skip to content

Commit c7d50d7

Browse files
committed
ci: create release.yml
1 parent 063d6a1 commit c7d50d7

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# From: https://tauri.app/v1/guides/building/cross-platform
2+
3+
name: Release
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
workflow_dispatch:
9+
10+
jobs:
11+
release:
12+
permissions:
13+
contents: write
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- platform: 'macos-latest'
19+
- platform: 'ubuntu-24.04'
20+
runs-on: ${{ matrix.platform }}
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Install dependencies (ubuntu only)
27+
if: matrix.platform == 'ubuntu-24.04'
28+
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y libappindicator3-dev librsvg2-dev patchelf
32+
sudo apt install -y \
33+
libwebkit2gtk-4.1-0=2.44.0-2 \
34+
libwebkit2gtk-4.1-dev=2.44.0-2 \
35+
libjavascriptcoregtk-4.1-0=2.44.0-2 \
36+
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
37+
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
38+
gir1.2-webkit2-4.1=2.44.0-2;
39+
40+
- name: Rust setup
41+
uses: dtolnay/rust-toolchain@stable
42+
43+
- name: Rust cache
44+
uses: swatinem/rust-cache@v2
45+
with:
46+
workspaces: './src-tauri -> target'
47+
48+
- name: Sync node version and setup cache
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: 'lts/*'
52+
cache: 'npm'
53+
54+
- name: Python setup
55+
uses: actions/setup-python@v4
56+
with:
57+
python-version: '3.11'
58+
59+
- name: Python cache
60+
uses: actions/cache@v3
61+
with:
62+
path: ~/.cache/pip
63+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
64+
restore-keys: |
65+
${{ runner.os }}-pip-
66+
67+
- name: Install Poetry
68+
run: |
69+
curl -sSL https://install.python-poetry.org | python3 -
70+
export PATH="$HOME/.local/bin:$PATH"
71+
72+
- name: Install node dependencies
73+
run: npm install
74+
75+
- name: Prebuild
76+
run: make prebuild
77+
78+
- name: Build the app
79+
uses: tauri-apps/tauri-action@v0
80+
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
85+
releaseName: 'aw-tauri v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
86+
releaseBody: 'See the assets to download and install this version.'
87+
releaseDraft: true
88+
prerelease: false
89+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)