Skip to content

Commit

Permalink
feat: 添加应用内更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed May 5, 2023
1 parent bd148b8 commit 01e3251
Show file tree
Hide file tree
Showing 5 changed files with 1,755 additions and 2,184 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/Update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Updater

on: workflow_dispatch

jobs:
release-update:
runs-on: ubuntu-latest
if: startsWith(github.repository, 'Pylogmon')
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: pnpm install
run: pnpm install

- name: Release updater file
run: pnpm run updater
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Upload Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG
token: ${{ secrets.RELEASE_TOKEN }}
files: update.json
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"tauri": "tauri"
"tauri": "tauri",
"updater": "node updater/updater.mjs"
},
"dependencies": {
"@emotion/react": "^11.10.6",
Expand All @@ -34,6 +35,7 @@
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^3.1.0",
"node-fetch": "^3.3.1",
"prettier": "2.8.8",
"vite": "^4.2.1"
}
Expand Down
Loading

0 comments on commit 01e3251

Please sign in to comment.