You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/building/cross-platform.md
+28-30Lines changed: 28 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,18 @@ To setup code signing for both Windows and macOS on your workflow, follow the sp
27
27
28
28
To set up Tauri Action you must first set up a GitHub repository. You can use this action on a repo that doesn't have Tauri configured since it automatically initializes Tauri before building and configuring it to use your artifacts.
29
29
30
-
Go to the Actions tab on your GitHub project and choose "New workflow", then choose "Set up a workflow yourself". Replace the file with the [Tauri Action production build workflow example]. Alternatively, you may set up the workflow based on the [example lower on this page](#example-workflow)
30
+
Go to the Actions tab on your GitHub project and choose "New workflow", then choose "Set up a workflow yourself". Replace the file with the [Tauri Action production build workflow example]. Alternatively, you may set up the workflow based on the [example at the bottom of this page](#example-workflow)
31
31
32
32
### Configuration
33
33
34
34
You can configure Tauri with the `configPath`, `distPath` and `iconPath` options. See the actions Readme for details.
35
35
36
-
Custom Tauri CLI scripts can be run with the `tauriScript` option. So instead of running `yarn tauri build` or `npx tauri build`, `${tauriScript}` will be executed. This can be useful when you need custom build functionality such as when creating Tauri apps e.g. a `desktop:build` script.
36
+
<!-- FIXME: tauriScript is currently broken.
37
+
Custom Tauri CLI scripts can be run with the `tauriScript` option. So instead of running `yarn tauri build` or `npx tauri build`, `${tauriScript}` will be executed. This can be useful when you need custom build functionality such as when creating Tauri apps e.g. a `desktop:build` script.
38
+
-->
37
39
38
40
When your app isn't on the root of the repo, use the `projectPath` input.
41
+
39
42
You may modify the workflow name, change the triggers, and add more steps such as `npm run lint` or `npm run test`. The important part is that you keep the below line at the end of the workflow, since this runs the build script and releases the artifacts:
40
43
41
44
```yaml
@@ -44,7 +47,7 @@ You may modify the workflow name, change the triggers, and add more steps such a
44
47
45
48
### How to Trigger
46
49
47
-
The release workflow by default is triggered by pushes on the "release" branch. The action automatically creates a tag and title for the GitHub release using the application version specified in `tauri.config.json`.
50
+
The release workflow in the README examples linked above is triggered by pushes on the "release" branch. The action automatically creates a tag and title for the GitHub release using the application version specified in `tauri.config.json`.
48
51
49
52
You can also trigger the workflow on the push of a version tag such as "app-v0.7.0". For this you can change the start of the release workflow:
50
53
@@ -61,15 +64,15 @@ on:
61
64
62
65
Below is an example workflow that has been setup to run every time a new version is created on git.
63
66
64
-
This workflow sets up the environment on Windows, Ubuntu, and macOS latest versions. Note under `jobs.release.strategy.matrix` the platform array which contains `macos-latest`, `ubuntu-latest`, and `windows-latest`.
67
+
This workflow sets up the environment on Windows, Ubuntu, and macOS latest versions. Note under `jobs.release.strategy.matrix` the platform array which contains `macos-latest`, `ubuntu-20.04`, and `windows-latest`.
65
68
66
69
The steps this workflow takes are:
67
70
68
-
1. Checkout the repository using `actions/checkout@v2`
69
-
2. Set up Node 16 using `actions/setup-node@v1`
70
-
3. Set up Rust using `actions-rs/toolchain@v1`
71
-
4. Installs all the dependencies and run the build script (for the web app)
72
-
5. Finally, it uses `tauri-apps/tauri-action@v0` to run `tauri build`, generate the artifacts, and create the GitHub release
71
+
1. Checkout the repository using `actions/checkout@v3`
72
+
2. Set up Node LTS and a cache for global npm/yarn/pnpm package data using `actions/setup-node@v3`.
73
+
3. Set up Rust and a cache for the `target/` folder using `dtolnay/rust-toolchain@stable` and `swatinem/rust-cache@v2`.
74
+
4. Installs all the dependencies and run the build script (for the web app).
75
+
5. Finally, it uses `tauri-apps/tauri-action@v0` to run `tauri build`, generate the artifacts, and create the GitHub release.
0 commit comments