Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 基于tauri将网页打包为桌面程序 #5

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c122af2
build: 使用tauri编译程序
VON0000 Aug 21, 2024
a5036fc
build: 使用tauri打包安装包
VON0000 Aug 21, 2024
11e117e
chore: 更新一些配置信息
laorange Sep 9, 2024
88bbe5a
Create compile.yml
VON0000 Sep 10, 2024
00fdc22
Update compile.yml
VON0000 Sep 10, 2024
0c2ddc3
Merge pull request #1 from VON0000/master
VON0000 Sep 10, 2024
8592e16
Update compile.yml
VON0000 Sep 10, 2024
579a120
Update compile.yml
VON0000 Sep 10, 2024
b6eccfe
Update compile.yml
VON0000 Sep 10, 2024
cbda77b
Update compile.yml
VON0000 Sep 10, 2024
88fd1c0
Update compile.yml
VON0000 Sep 10, 2024
629dbeb
Update compile.yml
VON0000 Sep 10, 2024
2f54aa7
Update compile.yml
VON0000 Sep 10, 2024
375c2f9
Update compile.yml
VON0000 Sep 10, 2024
0175f46
Update compile.yml
VON0000 Sep 10, 2024
dfed9ce
Update compile.yml
VON0000 Sep 10, 2024
27308a6
Update compile.yml
VON0000 Sep 10, 2024
de98382
Update compile.yml
VON0000 Sep 10, 2024
ffc1f90
Update compile.yml
VON0000 Sep 10, 2024
98f095e
Update compile.yml
VON0000 Sep 10, 2024
f33c9f1
Update compile.yml
VON0000 Sep 10, 2024
b645fee
Update compile.yml
VON0000 Sep 10, 2024
fcbdcb1
Update compile.yml
VON0000 Sep 10, 2024
2c69551
Update compile.yml
VON0000 Sep 10, 2024
4c02452
Update compile.yml
VON0000 Sep 10, 2024
e474cd6
Update compile.yml
VON0000 Sep 10, 2024
02bf7d9
Update compile.yml
VON0000 Sep 10, 2024
f4ca803
Update compile.yml
VON0000 Sep 10, 2024
d560d43
Update compile.yml
VON0000 Sep 10, 2024
7b46e33
Update compile.yml
VON0000 Sep 10, 2024
88c2912
Update compile.yml
VON0000 Sep 10, 2024
8f98513
Update compile.yml
VON0000 Sep 10, 2024
d0996f7
Update compile.yml
VON0000 Sep 10, 2024
d3e22f7
Merge pull request #2 from VON0000/workflow
VON0000 Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Compile

on:
push:
branches: [ "master", "workflow" ]
pull_request:
branches: [ "master", "workflow" ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4.0.3
with:
node-version: 20

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 9.3.0
run_install: false

- name: Install dependencies of pnpm
run: pnpm install --frozen-lockfile

- name: compile
run: pnpm run tauri-build

- name: List generated files
run: dir src-tauri/target/release/bundle/nsis

- name: Debug ref
run: echo "github.ref is ${{ github.ref }}"

- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: src-tauri/target/release/bundle/nsis/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"author": "laorange",
"homepage": "https://github.com/laorange/laminate-calculation",
"license": "AGPL-3.0",
"version": "3.1.0",
"version": "4.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build --base=./",
"build-flask": "vue-tsc --noEmit && vite build --base=/static/",
"build-go": "vue-tsc --noEmit && vite build --base=/dist/",
"preview": "vite preview"
"preview": "vite preview",
"tauri-build": "tauri build"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

像这样新增一个需要执行命令的,tauri build这类的命令,最好也加入到package.json的scripts当中,因为这是个以node作为根目录包管理的仓库。此处需要加上

},
"dependencies": {
"axios": "^0.27.2",
Expand All @@ -25,6 +26,7 @@
"vue": "^3.2.45"
},
"devDependencies": {
"@tauri-apps/cli": "^1.6.0",
"@vitejs/plugin-vue": "^2.3.4",
"typescript": "^4.9.3",
"unplugin-auto-import": "^0.7.2",
Expand Down
Loading