From e7858495e60266f84b2c397a2eadd049d1d6b8a6 Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Thu, 15 Jun 2023 03:28:53 +0800 Subject: [PATCH] feat: update app release workflow --- .github/workflows/app.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 01c44e21..2d7ce765 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -20,20 +20,15 @@ jobs: with: node-version: 16 - 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 id: create-release uses: actions/github-script@v6 with: script: | - const { data } = await github.rest.repos.createRelease({ + const { data } = await github.rest.repos.getLatestRelease({ owner: context.repo.owner, 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