From 04ee38726b08d3beea2acaabe9503db03384c798 Mon Sep 17 00:00:00 2001 From: slhaf Date: Mon, 11 May 2026 11:09:10 +0800 Subject: [PATCH] chore(release): use release-core tag workflow --- .github/workflows/release-core.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-core.yml b/.github/workflows/release-core.yml index b0bf97f4..0ef88507 100644 --- a/.github/workflows/release-core.yml +++ b/.github/workflows/release-core.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: inputs: tag: - description: "Release tag, for example rel-v0.5.0" + description: "Core release tag, for example release-core/0.5.0" required: true type: string push: tags: - - "rel-v*" + - "release-core/*" permissions: contents: write @@ -29,18 +29,20 @@ jobs: TAG="${GITHUB_REF_NAME}" fi - VERSION="${TAG#rel-v}" + VERSION="${TAG#release-core/}" + VERSION="${VERSION#v}" + ENCODED_TAG="${TAG//\//%2F}" ASSET_NAME="partner-core-${VERSION}.jar" - ASSET_URL="https://github.com/slhaf/Partner/releases/download/${TAG}/${ASSET_NAME}" + ASSET_URL="https://github.com/slhaf/Partner/releases/download/${ENCODED_TAG}/${ASSET_NAME}" echo "tag=${TAG}" >> "$GITHUB_OUTPUT" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "asset_name=${ASSET_NAME}" >> "$GITHUB_OUTPUT" echo "asset_url=${ASSET_URL}" >> "$GITHUB_OUTPUT" - echo "Release tag: ${TAG}" - echo "Release version: ${VERSION}" - echo "Release asset: ${ASSET_NAME}" + echo "Core release tag: ${TAG}" + echo "Core release version: ${VERSION}" + echo "Core release asset: ${ASSET_NAME}" - name: Checkout release source uses: actions/checkout@v4 @@ -84,7 +86,7 @@ jobs: gh release create "${{ steps.release.outputs.tag }}" \ "dist/${{ steps.release.outputs.asset_name }}" \ - --title "${{ steps.release.outputs.tag }}" \ + --title "Partner Core ${{ steps.release.outputs.version }}" \ --notes "Partner Core ${{ steps.release.outputs.version }}" env: GH_TOKEN: ${{ github.token }} @@ -132,4 +134,4 @@ jobs: git add registry/index.json git commit -m "chore(registry): update latest core release to ${{ steps.release.outputs.tag }}" - git push origin HEAD:master \ No newline at end of file + git push origin HEAD:master