Skip to content

Commit

Permalink
feat: auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghonglu.neo committed Mar 21, 2023
1 parent c074c01 commit 6339030
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 5 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: publish
on:
push:
branches:
- main
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
publish-tauri:
Expand Down Expand Up @@ -67,3 +67,37 @@ jobs:
releaseDraft: true
prerelease: false
args: --target ${{ matrix.target }}

updater:
runs-on: ubuntu-latest
needs: publish-tauri

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile

- name: Updater JSON
run: pnpm updater --token=${{ secrets.GITHUB_TOKEN }}

- name: Deploy install.json
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./updater
# force_orphan: true

- name: Query version number
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ChatGPT-T",
"version": "2.10.5",
"version": "0.0.0",
"private": false,
"description": "ChatGPT Tauri",
"author": "[email protected]",
Expand All @@ -24,7 +24,9 @@
"bootstrap": "pnpm install && pnpm run common:prepare",
"common:cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml",
"common:prepare": "husky install",
"tauri": "tauri"
"tauri": "tauri",
"updater": "tr updater",
"release": "tr release --git"
},
"dependencies": {
"@tauri-apps/api": "^1.2.0",
Expand All @@ -48,6 +50,7 @@
"@commitlint/config-conventional": "^17.4.4",
"@iconify/vue": "^4.1.0",
"@tauri-apps/cli": "^1.2.3",
"@tauri-release/cli": "^0.2.5",
"@types/crypto-js": "^4.1.1",
"@types/katex": "^0.16.0",
"@types/markdown-it": "^12.2.3",
Expand Down
207 changes: 207 additions & 0 deletions pnpm-lock.yaml

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

Loading

0 comments on commit 6339030

Please sign in to comment.