From fea48cd53678c32c36bdad6a17c175632d4021f6 Mon Sep 17 00:00:00 2001 From: Vida Xie Date: Sat, 22 Aug 2026 23:09:02 +0800 Subject: [PATCH] ci: try fix changelogithub not detecting release tag --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 49557c1..472fd99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,17 +23,20 @@ jobs: with: fetch-all: true + - name: Get version + id: version + run: echo "version=$(jq -r '.version' package.json)" >> "$GITHUB_OUTPUT" + - name: Create tag env: GH_TOKEN: ${{ github.token }} run: | - VERSION=$(jq -r '.version' package.json) gh api "repos/$GITHUB_REPOSITORY/git/refs" \ - -f ref="refs/tags/v$VERSION" \ + -f ref="refs/tags/v${{ steps.version.outputs.version }}" \ -f sha="${{ github.event.pull_request.merge_commit_sha }}" - name: Generate Github Changelog - run: npx changelogithub + run: npx changelogithub --to v${{ steps.version.outputs.version }} continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}