forked from XiaoMo/ChatGPT-Next-Web
feat: update app release workflow
This commit is contained in:
parent
6264c02543
commit
e7858495e6
9
.github/workflows/app.yml
vendored
9
.github/workflows/app.yml
vendored
@ -20,20 +20,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: get version
|
- name: get version
|
||||||
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
|
run: echo "PACKAGE_VERSION=$(node -p "require('./src-tauri/tauri.conf.json').package.version")" >> $GITHUB_ENV
|
||||||
- name: create release
|
- name: create release
|
||||||
id: create-release
|
id: create-release
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const { data } = await github.rest.repos.createRelease({
|
const { data } = await github.rest.repos.getLatestRelease({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
tag_name: `app-v${process.env.PACKAGE_VERSION}`,
|
|
||||||
name: `Desktop App v${process.env.PACKAGE_VERSION}`,
|
|
||||||
body: 'Take a look at the assets to download and install this app.',
|
|
||||||
draft: true,
|
|
||||||
prerelease: false
|
|
||||||
})
|
})
|
||||||
return data.id
|
return data.id
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user