mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user