Skip to content

Commit f3a49c4

Browse files
committed
update
1 parent 749ba70 commit f3a49c4

30 files changed

+5642
-0
lines changed

.github/workflows/build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build app
2+
3+
permissions:
4+
contents: write
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
on:
11+
push:
12+
branches:
13+
- main
14+
workflow_dispatch:
15+
16+
jobs:
17+
build-app:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
platform: [macos-latest, ubuntu-20.04, windows-latest]
22+
23+
runs-on: ${{ matrix.platform }}
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
31+
32+
- uses: pnpm/action-setup@v4
33+
with:
34+
version: latest
35+
36+
- name: install dependencies (ubuntu only)
37+
if: matrix.platform == 'ubuntu-20.04'
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
41+
42+
- name: Update macos-latest
43+
if: matrix.platform == 'macos-latest'
44+
run: |
45+
brew install rocksdb
46+
brew install llvm
47+
48+
- name: install dependencies (mac only)
49+
if: matrix.platform == 'macos-latest'
50+
run: |
51+
rustup target add aarch64-apple-darwin
52+
53+
- name: Install Rust stable
54+
uses: dtolnay/rust-toolchain@stable
55+
56+
- name: Rust cache
57+
uses: swatinem/rust-cache@v2
58+
with:
59+
workspaces: './src-tauri -> target'
60+
61+
- name: Sync node version and setup cache
62+
uses: actions/setup-node@v3
63+
with:
64+
node-version: '18'
65+
cache: 'pnpm'
66+
67+
- name: Install app dependencies and build web
68+
run: pnpm install --frozen-lockfile
69+
70+
- name: Build the app
71+
uses: tauri-apps/tauri-action@v0
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
tagName: ${{ github.ref_name }}
76+
releaseName: pntools ${{ needs.create-release.outputs.APP_VERSION }}
77+
releaseBody: ''
78+
releaseDraft: false
79+
prerelease: false

.github/workflows/release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
workflow_dispatch:
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
submodules: recursive
20+
21+
- name: Set output
22+
id: vars
23+
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
24+
25+
- name: Setup node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: 16.x
29+
30+
- name: Generate changelog
31+
id: create_release
32+
run: npx changelogithub --draft --name pntools-${{ steps.vars.outputs.tag }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
build-app:
37+
needs: create-release
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
platform: [macos-latest, ubuntu-20.04, windows-latest]
42+
43+
runs-on: ${{ matrix.platform }}
44+
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v3
48+
- uses: pnpm/action-setup@v2
49+
with:
50+
version: latest
51+
52+
- name: install dependencies (ubuntu only)
53+
if: matrix.platform == 'ubuntu-20.04'
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
57+
58+
- name: install dependencies (mac only)
59+
if: matrix.platform == 'macos-latest'
60+
run: |
61+
rustup target add aarch64-apple-darwin
62+
brew install g++
63+
64+
- name: Install Rust stable
65+
uses: dtolnay/rust-toolchain@stable
66+
67+
- name: Rust cache
68+
uses: swatinem/rust-cache@v2
69+
with:
70+
workspaces: "./src-tauri -> target"
71+
72+
- name: Sync node version and setup cache
73+
uses: actions/setup-node@v3
74+
with:
75+
node-version: "16"
76+
cache: "pnpm"
77+
78+
- name: Install app dependencies and build web
79+
run: pnpm install --frozen-lockfile
80+
81+
- name: Build the app
82+
uses: tauri-apps/tauri-action@v0
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
with:
86+
tagName: ${{ github.ref_name }}
87+
releaseName: pntools ${{ needs.create-release.outputs.APP_VERSION }}
88+
releaseBody: ""
89+
releaseDraft: true
90+
prerelease: false

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "it-tools-app",
3+
"private": true,
4+
"version": "0.1.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"preview": "vite preview",
10+
"tauri": "tauri"
11+
},
12+
"dependencies": {
13+
14+
"@tauri-apps/api": "^2",
15+
"@tauri-apps/plugin-opener": "^2"
16+
},
17+
"devDependencies": {
18+
19+
"@tauri-apps/cli": "^2"
20+
}
21+
}

pnpm-lock.yaml

Lines changed: 154 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
/target/
4+
5+
# Generated by Tauri
6+
# will have schema files for capabilities auto-completion
7+
/gen/schemas

0 commit comments

Comments
 (0)