From d78a286676223dd1bb173069ba4b90c3e4c1f866 Mon Sep 17 00:00:00 2001 From: OmentaElvis Date: Sat, 20 Dec 2025 16:00:49 +0300 Subject: [PATCH] fix(action): explicitly resolve 'latest' version tag The previous logic for detecting the 'latest' weld version relied on 'gh release download' interpreting an empty tag argument as the latest release. This was causing issues in consumer workflows, as it was seemingly looking for a literal 'latest' tag. This commit updates the 'Get Version Tag for Download' step to explicitly query the GitHub API for the actual tag name of the latest release when 'weld-version' is set to 'latest'. This ensures a concrete tag is always provided to the download command, making the action more robust. --- action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d0d7409..91b5e7a 100644 --- a/action.yml +++ b/action.yml @@ -25,10 +25,18 @@ runs: - name: Get Version Tag for Download id: get_version shell: bash + env: + GH_TOKEN: ${{ inputs.github-token }} run: | VERSION_TAG="" - if [[ "${{ inputs.weld-version }}" != "latest" ]]; then + if [[ "${{ inputs.weld-version }}" == "latest" ]]; then + echo "Figuring out the latest version..." + # Get the tag name of the latest release from the specified repo + VERSION_TAG=$(gh release view --repo ${{ inputs.repo }} --json tagName --jq .tagName) + echo "Latest version is ${VERSION_TAG}" + else VERSION_TAG="${{ inputs.weld-version }}" + echo "Using specified version ${VERSION_TAG}" fi echo "tag=${VERSION_TAG}" >> $GITHUB_OUTPUT