Fix the release workflow by copying before rename (#5319)

* Only copy files if not snapshot

* Move sequence to copy before rename
This commit is contained in:
Allen Byrne 2025-02-17 11:45:06 -06:00 committed by GitHub
parent d4200dc689
commit 255371c8e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,20 +141,20 @@ jobs:
bin/release -d $GITHUB_WORKSPACE gzip zip bin/release -d $GITHUB_WORKSPACE gzip zip
shell: bash shell: bash
- name: Rename release file base name
id: ren-basename
if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag == 'snapshot') }}
run: |
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.tar.gz hdf5-${{ inputs.use_tag }}.tar.gz
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.zip hdf5-${{ inputs.use_tag }}.zip
shell: bash
- name: Copy the release file source to a non-versioned file name - name: Copy the release file source to a non-versioned file name
id: cp-to-non-versioned id: cp-to-non-versioned
if: ${{ (inputs.use_environ == 'release') }} if: ${{ (inputs.use_environ == 'release') }}
run: | run: |
cp hdf5-${{ inputs.use_tag }}.tar.gz hdf5.tar.gz cp hdf5-${{ steps.version.outputs.SOURCE_TAG }}.tar.gz hdf5.tar.gz
cp hdf5-${{ inputs.use_tag }}.zip hdf5.zip cp hdf5-${{ steps.version.outputs.SOURCE_TAG }}.zip hdf5.zip
shell: bash
- name: Rename release file base name
id: ren-basename
if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag == 'snapshot') }}
run: |
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.tar.gz ${{ inputs.use_tag }}.tar.gz
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.zip ${{ inputs.use_tag }}.zip
shell: bash shell: bash
- name: List files in the repository - name: List files in the repository