From b8076554c1e8d3eadf8d31cb3d7e1e80e85c1cef Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Feb 2025 13:05:09 -0600 Subject: [PATCH 1/2] Fix tag typo --- .github/workflows/release-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 774cab55a5f..85c158c8242 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -251,7 +251,7 @@ jobs: if: ${{ (inputs.use_environ == 'release') }} uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 with: - tag_name: "v${{ inputs.use_tag }}" + tag_name: "${{ inputs.use_tag }}" name: "HDF5 Release ${{ inputs.use_tag }}" prerelease: false body_path: description.txt From 42d17583199eda7f50f35b864bd01ff7a4fe1fc7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Feb 2025 15:44:58 -0600 Subject: [PATCH 2/2] Check if snapshot is tag name and adjust tag to add v to a number tag --- .github/workflows/release-files.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 85c158c8242..231db5f509a 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -246,12 +246,25 @@ jobs: ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + - name: Release tag name + id: create_release_tag_name + if: ${{ (inputs.use_environ == 'release') }} + run: | + if [[ '${{ inputs.use_tag }}' == 'snapshot' ]] + then + TAG_NAME_BASE=$(echo "snapshot") + else + TAG_NAME_BASE=$(echo "v${{ inputs.use_tag }}") + fi + echo "TAG_BASE=$TAG_NAME_BASE" >> $GITHUB_OUTPUT + shell: bash + - name: Release tag id: create_release if: ${{ (inputs.use_environ == 'release') }} uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 with: - tag_name: "${{ inputs.use_tag }}" + tag_name: "${{ steps.create_release_tag_name.outputs.TAG_BASE }}" name: "HDF5 Release ${{ inputs.use_tag }}" prerelease: false body_path: description.txt