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
This example app uses Next.js as the frontend and Python (FastAPI) as the backend. Tauri is a Rust framework that orchestrates the frontend and backend(s) into a native app experience.
25
42
26
43
This template project is intended to demonstrate the use of single file Python executables with Tauri v2.
@@ -106,11 +123,11 @@ Run the app in development mode:
106
123
pnpm tauri dev
107
124
```
108
125
109
-
### Build
126
+
##Deploy using your machine
110
127
111
-
#### Compile python sidecar
128
+
###1. Compile Python sidecar
112
129
113
-
Run this at least once before running `pnpm tauri dev` and each time you make changes to your python code. This command is also called by `pnpm tauri build`:
130
+
Run this at least once before running `pnpm tauri dev`or `pnpm tauri build`and each time you make changes to your python code:
114
131
115
132
```bash
116
133
pnpm build:sidecar-winos
@@ -128,15 +145,20 @@ pip install -U pyinstaller
128
145
129
146
A note on compiling Python exe (the -F flag bundles everything into one .exe). You won't need to run this manually each build, I have included it in the build scripts.
130
147
131
-
---
148
+
### 2. Build Next.js (optional)
149
+
150
+
Build the static html files that tauri will serve as your front-end.
151
+
152
+
```bash
153
+
pnpm run build
154
+
```
132
155
133
-
#### Build for production
156
+
###3. Build tauri (and Next.js)
134
157
135
-
Build the production app for a specific OS:
158
+
Tauri will run the "build" script (which does the same as the previous step) before it builds the tauri app, see `tauri.conf.json` file. You can edit what script it runs in the `beforeBuildCommand`.
159
+
Build the production app on your machine for a specific OS:
136
160
137
161
```bash
138
-
# Uses `pnpm build:sidecar-winos` by default
139
-
# Modify script for your target OS
140
162
pnpm tauri build
141
163
```
142
164
@@ -148,7 +170,21 @@ And the raw executable here:
148
170
149
171
-`<project-dir>\src-tauri\target\release`
150
172
151
-
## Issue's ?
173
+
## Deploy using Github Actions
174
+
175
+
Fork this repo in order to access a manual trigger to build for each platform (Windows, MacOS, Linux) and upload a release. You can then modify the `release.yml` file to suit your specific app's build pipeline needs. Workflow permissions must be set to "Read and write". Any git tags created before a workflow existed will not be usable for that workflow.
176
+
177
+
Initiate the Workflow Manually:
178
+
179
+
1. Navigate to the "Actions" tab in your GitHub repository.
180
+
2. Select the "Manual Tauri Release" workflow.
181
+
3. Click on "Run workflow" and provide the necessary inputs:
182
+
183
+
- release_name: The title of the release.
184
+
- release_notes (optional): Notes or changelog for the release.
185
+
- release_type: ("draft", "public", "private")
186
+
187
+
## Issues?
152
188
153
189
- "Failed to fetch" error: In `src/backends/main.py` CORS expects your UI is running on localhost:3000. If not, add your url to the `origins = []` array or set:
0 commit comments