77 workflow_dispatch :
88
99env :
10- APP_NAME : " Sample Desktop App "
10+ APP_NAME : " Idea Checklist "
1111
1212jobs :
13- changelog :
14- runs-on : ubuntu-latest
15- steps :
16- - name : Checkout repository
17- uses : actions/checkout@v4
18-
19- - name : Build changelog
20- id : build_changelog
21- run : |
22- # NOTE: if commits subjects are standardized, you can filter the git log based on feat: and fix:
23- # and then replace "feat:" with "New: " and "fix:" with "Fixed "
24- # when AI gets good, we can also summarized commits into a bullet point list
25- PREV_TAG=$(git tag --list v* | tail -n2 | head -n1)
26- echo "changelog=$(git log $PREV_TAG...${{ github.ref_name }} --pretty=format:"- %s")" >> $GITHUB_OUTPUT
27- outputs :
28- changelog : ${{ steps.build_changelog.outputs.changelog }}
29- release :
13+ publish-tauri :
14+ permissions :
15+ contents : write
3016 strategy :
3117 fail-fast : false
3218 matrix :
@@ -35,100 +21,44 @@ jobs:
3521 args : ' --target aarch64-apple-darwin'
3622 - platform : ' macos-latest' # for Intel based macs.
3723 args : ' --target x86_64-apple-darwin'
38- - platform : ' ubuntu-latest '
24+ - platform : ' ubuntu-22.04 ' # for Tauri v1 you could replace this with ubuntu-20.04.
3925 args : ' '
4026 - platform : ' windows-latest'
4127 args : ' '
28+
4229 runs-on : ${{ matrix.platform }}
43- needs : [changelog]
4430 steps :
45- - name : Checkout repository
46- uses : actions/checkout@v4
31+ - uses : actions/checkout@v4
4732
48- # build the changelog based on the commit messages between the versioned tags
49- - name : Install pnpm
50- uses : pnpm/action-setup@v4
51- with :
52- version : 9
53-
54- - name : Setup Node.js
33+ - name : setup node
5534 uses : actions/setup-node@v4
56- # NOTE: enterprise developers may hard code a version
5735 with :
58- node-version : ' lts/*'
59- cache : pnpm
60- # node-version-file: '.nvmrc'
36+ node-version : lts/*
6137
62- - name : Install Rust stable
63- uses : dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
38+ - name : install Rust stable
39+ uses : dtolnay/rust-toolchain@stable
6440 with :
6541 # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
6642 targets : ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
6743
68- - name : Rust cache
69- uses : swatinem/rust-cache@v2
70- with :
71- workspaces : ' ./src-tauri -> target'
72-
73- - name : Install Ubuntu dependencies
74- if : matrix.platform == 'ubuntu-latest'
44+ - name : install dependencies (ubuntu only)
45+ if : matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
7546 run : |
76- sudo apt update
77- xargs sudo apt install -y < environment/apt_packages.txt
47+ sudo apt-get update
48+ sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
49+ # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
50+ # You can remove the one that doesn't apply to your app to speed up the workflow a bit.
7851
79- - name : Install frontend dependencies
80- run : |
81- pnpm install
82-
83- - name : CI Build
84- if : ${{ github.ref_type == 'branch' }}
85- run : |
86- pnpm rls
87-
88- - name : CI upload Windows
89- if : ${{ github.ref_type == 'branch' && matrix.platform == 'windows-latest' }}
90- uses : actions/upload-artifact@v4
91- with :
92- name : ' Windows Installers'
93- path : |
94- src-tauri/release/bundle/msi/*.msi
95- src-tauri/release/bundle/nsis/*.exe
96-
97- - name : CI upload macOS
98- if : ${{ github.ref_type == 'branch' && matrix.platform == 'macos-latest' }}
99- uses : actions/upload-artifact@v4
100- with :
101- name : ' macOS Installer'
102- path : |
103- src-tauri/release/bundle/dmg/*.dmg
104-
105- - name : CI upload Linux
106- if : ${{ github.ref_type == 'branch' && matrix.platform == 'ubuntu-latest' }}
107- uses : actions/upload-artifact@v4
108- with :
109- name : ' Linux Distributions'
110- path : |
111- src-tauri/target/release/bundle/deb/*.deb
112- src-tauri/target/release/bundle/AppImage/*.AppImage
52+ - name : install frontend dependencies
53+ run : npm install # change this to npm, pnpm or bun depending on which one you use.
11354
114- # TODO: https://tauri.app/v1/guides/building/linux#cross-compiling-tauri-applications-for-arm-based-devices
115- - name : Build Tauri app
116- uses : tauri-apps/tauri-action@v0
117- if : ${{ github.ref_type == 'tag' }}
118- # if u get Error: Resource not accessible by integration
119- # go to repository Settings => Action => General => Workflow permissions => Switch to Read and Write permisions
55+ - uses : tauri-apps/tauri-action@v0
12056 env :
121- CI : true
12257 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123- TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
124- TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
12558 with :
126- # tauri-action replaces \_\_VERSION\_\_ with the app version
127- tagName : ${{ github.ref_name }}
128- releaseName : " ${{ env.APP_NAME }} v__VERSION__"
129- releaseBody : |
130- ${{needs.changelog.outputs.changelog}}
131- See the assets to download this version and install.
59+ tagName : app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
60+ releaseName : ' App v__VERSION__'
61+ releaseBody : ' See the assets to download this version and install.'
13262 releaseDraft : true
13363 prerelease : false
13464 args : ${{ matrix.args }}
0 commit comments