hdf5 plugins publishrelease #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: hdf5 plugins publishrelease | |
# Triggers the workflow on demand | |
on: | |
workflow_dispatch: | |
inputs: | |
use_tag: | |
description: 'HDF5 Plugins Release version tag' | |
type: string | |
required: true | |
target_dir: | |
description: 'HDF5 Plugins target bucket directory' | |
type: string | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
publish-tag: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Get Sources | |
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
ref: '${{ github.head_ref || github.ref_name }}' | |
- name: Get plugins release | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: 'HDFGroup/hdf5_plugins' | |
version: 'tags/${{ inputs.use_tag }}' | |
regex: true | |
target: 'PLUGINS/' | |
file: '${{ inputs.use_hdf }}-*.*' | |
- name: Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Sync release to S3 bucket | |
run: | | |
aws s3 sync ./PLUGINS s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/downloads --delete | |