From 0e179d1f60d40f8364af846b4d9bbe64eea42be4 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:12:50 -0500 Subject: [PATCH] Add back snapshot names (#4198) --- .github/workflows/daily-build.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tarball.yml | 29 +++++++++++++++++++++-------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index bc25009d7c..af4e60e778 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -35,7 +35,7 @@ jobs: call-workflow-tarball: uses: ./.github/workflows/tarball.yml with: - #use_tag: snapshot + use_tag: snapshot use_environ: snapshots call-workflow-ctest: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25239a4f72..e7c90a4689 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: needs: log-the-inputs uses: ./.github/workflows/tarball.yml with: -# use_tag: ${{ inputs.use_tag }} + use_tag: ${{ inputs.use_tag }} use_environ: release call-workflow-ctest: diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index a721e1df90..914f9da621 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -4,11 +4,11 @@ name: hdf5 dev tarball on: workflow_call: inputs: -# use_tag: -# description: 'Release version tag' -# type: string -# required: false -# default: snapshot + use_tag: + description: 'Release version tag' + type: string + required: false + default: snapshot use_environ: description: 'Environment to locate files' type: string @@ -105,7 +105,12 @@ jobs: then FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") else - FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}") + if [[ '${{ inputs.use_tag }}' == 'snapshot' ]] + then + FILE_NAME_BASE=$(echo "${{ inputs.use_tag }}") + else + FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}") + fi fi echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash @@ -120,10 +125,18 @@ jobs: - name: Create release file base name id: create-rel-base - if: ${{ (inputs.use_environ == 'release') }} + if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag != 'snapshot') }} run: | cd "$GITHUB_WORKSPACE/hdfsrc" - bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip + bin/release -d $GITHUB_WORKSPACE gzip zip + shell: bash + + - name: Create snapshot file base name + id: create-snap-base + if: ${{ (inputs.use_tag == 'snapshot') && (inputs.use_environ == 'release') }} + run: | + cd "$GITHUB_WORKSPACE/hdfsrc" + bin/release -d $GITHUB_WORKSPACE --branch ${{ inputs.use_tag }} gzip zip shell: bash - name: List files in the repository