From 51b92ccee54ed3f14af3509c9ac5e4f3c82e58ce Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 20 Aug 2026 14:33:48 -0500 Subject: [PATCH] Create tag with publish (#6606) * Move release tag creation in draft to publish of draft. * target_commitish needs the full sha for the release tag. --- .github/workflows/release-files.yml | 28 ++-------------------------- .github/workflows/tarball.yml | 4 ++-- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 2f38593d2c0..b32ca8aef01 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -36,34 +36,8 @@ env: # Previous workflows must pass to get here so tag the commit that created the files jobs: - create-tag: - runs-on: ubuntu-latest - permissions: - contents: write # In order to allow tag creation - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - ref: '${{ github.head_ref || github.ref_name }}' - - - uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2 - id: "tag_create" - with: - commit_sha: ${{ inputs.file_sha }} - tag: "${{ inputs.use_tag }}" - force_push_tag: false - tag_exists_error: false - message: "Latest snapshot" - - # Print result using the action output. - - run: | - echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}" - PreRelease-getfiles: runs-on: ubuntu-latest - needs: create-tag environment: ${{ inputs.use_environ }} permissions: contents: write @@ -223,6 +197,7 @@ jobs: uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 with: tag_name: "${{ inputs.use_tag }}" + target_commitish: ${{ inputs.file_sha }} prerelease: true body_path: description.txt files: | @@ -264,6 +239,7 @@ jobs: uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 with: tag_name: "${{ steps.create_release_tag_name.outputs.TAG_BASE }}" + target_commitish: ${{ inputs.file_sha }} name: "HDF5 Release ${{ inputs.use_tag }}" draft: true prerelease: false diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 73a0688290c..86711815fb5 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -33,8 +33,8 @@ on: description: "The branch used for the source tarballs" value: ${{ jobs.check_commits.outputs.branch_ref }} file_sha: - description: "The sha used for the source tarballs" - value: ${{ jobs.check_commits.outputs.branch_sha }} + description: "The full commit sha used as target_commitish for the release tag" + value: ${{ jobs.check_commits.outputs.branch_full_sha }} permissions: contents: read