summaryrefslogtreecommitdiffstats
path: root/.github/workflows/tarball.yml
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-06-30 01:10:13 (GMT)
committerGitHub <noreply@github.com>2023-06-30 01:10:13 (GMT)
commitadfd0c0f6eb65c8a411ad5bf79bc1ed83a8f78c4 (patch)
tree672dbc53c53bba2d568f6de445023ca9747f63e7 /.github/workflows/tarball.yml
parent265f31162445be244e0c8041b8f55e3655cbd359 (diff)
downloadhdf5-adfd0c0f6eb65c8a411ad5bf79bc1ed83a8f78c4.zip
hdf5-adfd0c0f6eb65c8a411ad5bf79bc1ed83a8f78c4.tar.gz
hdf5-adfd0c0f6eb65c8a411ad5bf79bc1ed83a8f78c4.tar.bz2
Hdf5 1 10 release action (#3200)
* Update actions for release option, fix branch for daily build * Scheduled workflows run on latest commit on the develop
Diffstat (limited to '.github/workflows/tarball.yml')
-rw-r--r--.github/workflows/tarball.yml43
1 files changed, 38 insertions, 5 deletions
diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml
index ce6b2cf..d06bf1a 100644
--- a/.github/workflows/tarball.yml
+++ b/.github/workflows/tarball.yml
@@ -3,6 +3,17 @@ name: hdf5 1.10 tarball
# Controls when the action will run. Triggers the workflow on a schedule
on:
workflow_call:
+ inputs:
+# use_tag:
+# description: 'Release version tag'
+# type: string
+# required: false
+# default: snapshot-1.10
+ use_environ:
+ description: 'Environment to locate files'
+ type: string
+ required: true
+ default: snapshots
outputs:
has_changes:
description: "Whether there were changes the previous day"
@@ -55,6 +66,7 @@ jobs:
with:
seconds: 86400 # One day in seconds
branch: '${{ steps.get-branch-name.outputs.branch_ref }}'
+ if: ${{ inputs.use_environ == 'snapshots' }}
- run: echo "You have ${{ steps.check-new-commits.outputs.new-commits-number }} new commit(s) in ${{ steps.get-branch-name.outputs.BRANCH_REF }} ✅!"
if: ${{ steps.check-new-commits.outputs.has-new-commits == 'true' }}
@@ -65,7 +77,7 @@ jobs:
name: Create a source tarball
runs-on: ubuntu-latest
needs: check_commits
- if: ${{ needs.check_commits.outputs.has_changes == 'true' }}
+ if: ${{ ((inputs.use_environ == 'snapshots') && (needs.check_commits.outputs.has_changes == 'true')) || (inputs.use_environ == 'release') }}
outputs:
file_base: ${{ steps.set-file-base.outputs.FILE_BASE }}
steps:
@@ -80,22 +92,43 @@ jobs:
sudo apt update
sudo apt install automake autoconf libtool libtool-bin gzip dos2unix
+ - name: Retrieve version
+ id: version
+ run: |
+ cd "$GITHUB_WORKSPACE/hdfsrc"
+ echo "TAG_VERSION=$(bin/h5vers)" >> $GITHUB_OUTPUT
+
- name: Set file base name
id: set-file-base
run: |
- FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}")
+ if [[ '${{ inputs.use_environ }}' == 'snapshots' && '${{ needs.check_commits.outputs.has_changes }}' == 'true' ]]
+ 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 }}")
+ fi
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
+ shell: bash
- - name: Run release script
- id: run-release-script
+ - name: Create snapshot file base name
+ id: create-file-base
+ if: ${{ (inputs.use_environ == 'snapshots') && (needs.check_commits.outputs.has_changes == 'true') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip
shell: bash
+ - name: Create release file base name
+ id: create-rel-base
+ if: ${{ (inputs.use_environ == 'release') }}
+ run: |
+ cd "$GITHUB_WORKSPACE/hdfsrc"
+ bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip
+ shell: bash
+
- name: List files in the repository
run: |
- ls ${{ github.workspace }}
+ ls -l ${{ github.workspace }}
ls $GITHUB_WORKSPACE
# Save files created by release script