Skip to content

Commit

Permalink
ci: build native
Browse files Browse the repository at this point in the history
  • Loading branch information
ForkKILLET committed Sep 8, 2023
1 parent 72d2fcc commit 3792def
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build_native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build_native

on:
push:
branches:
- release

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.x.x

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

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install frontend dependencies
run: pnpm i --no-frozen-lockfile

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./native
tagName: native-v__VERSION__
releaseName: 'Native v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: false
prerelease: false
5 changes: 4 additions & 1 deletion native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
},
"keywords": [],
"author": "",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"cross-env": "^7.0.3"
}
}
2 changes: 1 addition & 1 deletion native/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"build": {
"beforeBuildCommand": "VITE_SYNC_API=\"https://be.icelava.top:49374/NyaDict\" pnpm -F nyadict-frontend build",
"beforeBuildCommand": "pnpm cross-env VITE_SYNC_API=\"https://be.icelava.top:49374/NyaDict\" pnpm -F nyadict-frontend build",
"beforeDevCommand": "pnpm -F nyadict-frontend dev",
"devPath": "http://localhost:1635",
"distDir": "../../frontend/dist"
Expand Down
14 changes: 13 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3792def

Please sign in to comment.