|
6 | 6 | - master
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - publish-tauri: |
10 |
| - permissions: |
11 |
| - contents: write |
| 9 | + v1: |
12 | 10 | strategy:
|
13 | 11 | fail-fast: false
|
14 | 12 | matrix:
|
15 | 13 | include:
|
16 |
| - # - platform: "macos-latest" # for Arm based macs (M1 and above). |
17 |
| - # args: "--target aarch64-apple-darwin" |
18 |
| - # - platform: "macos-latest" # for Intel based macs. |
19 |
| - # args: "--target x86_64-apple-darwin" |
20 |
| - # - platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04. |
21 |
| - # - platform: "ubuntu-20.04" |
22 |
| - # args: "" |
| 14 | + - platform: "macos-latest" |
| 15 | + args: "--verbose --target universal-apple-darwin" |
| 16 | + - platform: "ubuntu-20.04" |
| 17 | + args: "--verbose" |
23 | 18 | - platform: "windows-latest"
|
24 |
| - args: "" |
| 19 | + args: "--verbose" |
25 | 20 |
|
26 | 21 | runs-on: ${{ matrix.platform }}
|
27 | 22 | steps:
|
28 |
| - - name: Checkout |
29 |
| - uses: actions/checkout@v4 |
| 23 | + - uses: actions/checkout@v4 |
30 | 24 |
|
31 |
| - - uses: pnpm/action-setup@v4 |
32 |
| - name: Install pnpm |
| 25 | + # node |
| 26 | + - name: install pnpm |
| 27 | + uses: pnpm/action-setup@v4 |
33 | 28 | with:
|
34 |
| - version: 8 |
35 |
| - run_install: false |
| 29 | + version: 9.x.x |
36 | 30 |
|
37 |
| - - name: Install Node.js |
| 31 | + - name: setup node |
38 | 32 | uses: actions/setup-node@v4
|
39 | 33 | with:
|
40 |
| - node-version: 20 |
41 |
| - cache: "pnpm" |
| 34 | + node-version: lts/* |
| 35 | + cache: pnpm |
42 | 36 |
|
43 |
| - - name: Install dependencies |
44 |
| - run: pnpm install |
45 |
| - |
46 |
| - # - name: setup node |
47 |
| - # uses: actions/setup-node@v4 |
48 |
| - # with: |
49 |
| - # node-version: lts/* |
| 37 | + # TODO: test the auto installation of the tauri cli |
| 38 | + - name: install example dependencies |
| 39 | + run: | |
| 40 | + cd ./.github/fixtures/example-v1 |
| 41 | + pnpm install |
| 42 | + cd ../example-with-tauri-v1 |
| 43 | + pnpm install |
50 | 44 |
|
| 45 | + # rust |
51 | 46 | - name: install Rust stable
|
52 | 47 | uses: dtolnay/rust-toolchain@stable
|
53 | 48 | with:
|
54 |
| - # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. |
55 |
| - targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} |
| 49 | + targets: aarch64-apple-darwin,x86_64-apple-darwin |
56 | 50 |
|
| 51 | + - uses: Swatinem/rust-cache@v2 |
| 52 | + with: |
| 53 | + cache-on-failure: true |
| 54 | + workspaces: | |
| 55 | + ./.github/fixtures/example-v1/src-tauri -> ../../target |
| 56 | + ./.github/fixtures/example-with-tauri-v1/src-tauri -> ../../target |
| 57 | +
|
| 58 | + # system |
57 | 59 | - name: install dependencies (ubuntu only)
|
58 |
| - # if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. |
59 |
| - if: matrix.platform == 'ubuntu-20.04' # This must match the platform value defined above. |
| 60 | + if: matrix.platform == 'ubuntu-20.04' |
60 | 61 | run: |
|
61 | 62 | sudo apt-get update
|
62 |
| - sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf |
63 |
| - # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. |
64 |
| - # You can remove the one that doesn't apply to your app to speed up the workflow a bit. |
| 63 | + sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev |
65 | 64 |
|
66 |
| - - name: install frontend dependencies |
67 |
| - run: yarn install # change this to npm, pnpm or bun depending on which one you use. |
| 65 | + - name: Preconfigured Tauri Project |
| 66 | + uses: ./ |
| 67 | + env: |
| 68 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + # Updater signature is exposed here to make sure it works in PR's |
| 70 | + TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg== |
| 71 | + with: |
| 72 | + projectPath: ./.github/fixtures/example-with-tauri-v1 |
| 73 | + includeDebug: true |
| 74 | + includeRelease: false |
| 75 | + tagName: ${{ !github.event.pull_request.head.repo.fork && 'example-with-tauri-v__VERSION__' || '' }} |
| 76 | + releaseName: "Release example with preconfigured Tauri app v__VERSION__ for tauri-v1" |
| 77 | + releaseBody: "See the assets to download this version and install." |
| 78 | + releaseDraft: true |
| 79 | + args: ${{ matrix.args }} |
| 80 | + |
| 81 | + - name: Frontend-only Project |
| 82 | + uses: ./ |
| 83 | + env: |
| 84 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 85 | + # Updater signature is exposed here to make sure it works in PR's |
| 86 | + TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg== |
| 87 | + with: |
| 88 | + projectPath: ./.github/fixtures/example-v1 |
| 89 | + distPath: ../dist # relative to tauri.conf.json |
| 90 | + iconPath: ./icon.png # relative to projectPath |
| 91 | + bundleIdentifier: com.tauri.actiontest |
| 92 | + appName: example |
| 93 | + appVersion: ../package.json # relative to tauri.conf.json |
| 94 | + includeDebug: true |
| 95 | + includeRelease: false |
| 96 | + tagName: ${{ !github.event.pull_request.head.repo.fork && 'example-v__VERSION__' || '' }} |
| 97 | + releaseName: "Release example app v__VERSION__ for tauri-v1" |
| 98 | + releaseBody: "See the assets to download this version and install." |
| 99 | + releaseDraft: true |
| 100 | + args: ${{ matrix.args }} |
68 | 101 |
|
69 | 102 | - uses: tauri-apps/tauri-action@v0
|
70 | 103 | env:
|
|
0 commit comments