Skip to content

Commit a394b9e

Browse files
author
Anaïs Saraiva
committed
Update build.yml
1 parent f64e891 commit a394b9e

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: 'publish'
2-
32
on:
43
workflow_dispatch:
54
push:
@@ -28,7 +27,7 @@ jobs:
2827
- uses: actions/checkout@v4
2928

3029
- name: install dependencies (ubuntu only)
31-
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
30+
if: matrix.platform == 'ubuntu-22.04'
3231
run: |
3332
sudo apt-get update
3433
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
@@ -37,12 +36,11 @@ jobs:
3736
uses: actions/setup-node@v4
3837
with:
3938
node-version: lts/*
40-
cache: 'npm' # Set this to npm, yarn or pnpm.
39+
cache: 'npm'
4140

4241
- name: install Rust stable
43-
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
42+
uses: dtolnay/rust-toolchain@stable
4443
with:
45-
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
4644
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
4745

4846
- name: Rust cache
@@ -51,16 +49,25 @@ jobs:
5149
workspaces: './src-tauri -> target'
5250

5351
- name: install frontend dependencies
54-
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
55-
run: npm install # change this to npm or pnpm depending on which one you use.
52+
run: npm install
53+
54+
- name: install Tauri CLI (Rust version)
55+
run: cargo install tauri-cli --locked
5656

57-
- uses: tauri-apps/tauri-action@v0
57+
- name: build tauri app
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
run: cargo tauri build ${{ matrix.args }}
61+
62+
- name: create release
63+
uses: softprops/action-gh-release@v1
64+
if: startsWith(github.ref, 'refs/tags/')
6065
with:
61-
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
62-
releaseName: 'App v__VERSION__'
63-
releaseBody: 'See the assets to download this version and install.'
64-
releaseDraft: true
65-
prerelease: false
66-
args: ${{ matrix.args }}
66+
files: |
67+
src-tauri/target/release/bundle/deb/*.deb
68+
src-tauri/target/release/bundle/appimage/*.AppImage
69+
src-tauri/target/release/bundle/msi/*.msi
70+
src-tauri/target/release/bundle/dmg/*.dmg
71+
src-tauri/target/release/bundle/macos/*.app
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)