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