From 737cbb7a8aea38f85fdadd5ca7f9979e9c9d0a68 Mon Sep 17 00:00:00 2001 From: Snider Date: Tue, 30 Sep 2025 15:44:10 +0100 Subject: [PATCH] Extract and use BUILD_VERSION for release tag The workflow now extracts BUILD_VERSION from the Makefile and uses it as the release tag name instead of the chain network. This ensures that releases are tagged with the correct version, and adds error handling if the version is not found. --- .github/actions/upload-artifacts/action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/actions/upload-artifacts/action.yml b/.github/actions/upload-artifacts/action.yml index 1d4d9ea8..4a733c11 100644 --- a/.github/actions/upload-artifacts/action.yml +++ b/.github/actions/upload-artifacts/action.yml @@ -29,6 +29,14 @@ runs: FILENAME="${{ inputs.chain-network }}-${{ inputs.asset-type }}-${TARGET_OS}-${LOWERCASE_ARCH}" echo "key=$FILENAME" >> $GITHUB_OUTPUT + VERSION=$(grep '^BUILD_VERSION:=' Makefile | cut -d'=' -f2) + # Check if a version was found + if [ -z "$VERSION" ]; then + echo "Error: BUILD_VERSION could not be found in the Makefile." >&2 + exit 1 + fi + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + # Format the output to be a multi-line string. # This is the correct way to pass a multi-line string in GITHUB_OUTPUT. echo "paths<> "$GITHUB_OUTPUT" @@ -62,7 +70,7 @@ runs: - name: Make Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.chain-network }} + tag_name: ${{ steps.asset.outputs.version }} prerelease: contains(inputs.chain-network, 'testnet') files: ${{ inputs.asset-directory }}/lethean-* target_commitish: ${{ github.sha }} \ No newline at end of file