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