From b497cc2947b4b2bab575af0389b46ff5913d2aed Mon Sep 17 00:00:00 2001 From: VirtualHotBar <96966978+VirtualHotBar@users.noreply.github.com> Date: Sat, 4 May 2024 14:52:50 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb15cbd..9b68b1a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: "publish" +name: "Publish Release" on: @@ -33,12 +33,10 @@ jobs: uses: actions/github-script@v6 with: script: | - const lastSegment = process.env.PACKAGE_VERSION.split('.').pop(); - const { data } = await github.rest.repos.createRelease({ owner: context.repo.owner, repo: context.repo.repo, - tag_name: `v${lastSegment}`, + tag_name: `v${process.env.PACKAGE_VERSION}`, name: `NetMonut v${process.env.PACKAGE_VERSION}`, body: 'Take a look at the assets to download and install this app.', draft: true, @@ -118,7 +116,8 @@ jobs: publish-release: runs-on: ubuntu-latest needs: [create-release, build-tauri, generate-changelog] - + permissions: + contents: write steps: - name: publish release uses: actions/github-script@v6