Skip to content

Commit ab5d1e2

Browse files
authored
Add github workflow to automatically build releases
1 parent daf3fdb commit ab5d1e2

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
platform: [macos-latest, ubuntu-20.04, windows-latest]
16+
runs-on: ${{ matrix.platform }}
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Install dependencies (ubuntu only)
23+
if: matrix.platform == 'ubuntu-20.04'
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
27+
28+
- name: Rust setup
29+
uses: dtolnay/rust-toolchain@stable
30+
31+
- name: Rust cache
32+
uses: swatinem/rust-cache@v2
33+
with:
34+
workspaces: './src-tauri -> target'
35+
36+
- name: Sync node version and setup cache
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version: 'lts/*'
40+
cache: 'pnpm'
41+
42+
- name: Install frontend dependencies
43+
run: pnpm install
44+
45+
- name: Build the app
46+
uses: tauri-apps/tauri-action@v0
47+
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
52+
releaseName: 'image-set-tag-editor v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
53+
releaseBody: 'See the assets to download and install this version.'
54+
releaseDraft: true
55+
prerelease: false

0 commit comments

Comments
 (0)