Skip to content

Commit

Permalink
Create a publish workflow (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Jun 10, 2024
1 parent 5eb263c commit 0417570
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: hdfview publishrelease

# Controls when the action will run. Triggers the workflow on a schedule
on:
workflow_dispatch:
inputs:
use_tag:
description: 'HDFView Release version tag'
type: string
required: true
target_dir:
description: 'HDFView target bucket directory'
type: string
required: true
permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
ref: '${{ github.head_ref || github.ref_name }}'

- name: Get hdfview release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdfview'
version: 'tags/${{ inputs.use_hdf }}'
regex: true
target: 'HDFVIEW/'
file: '${{ inputs.use_hdf }}-*.*'

- name: Get hdfview release UG
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdfview'
version: 'tags/${{ inputs.use_hdf }}'
regex: true
target: 'HDFVIEW/'
file: 'UsersGuide.*'

- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v1
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 ./HDFVIEW s3://${{ secrets.AWS_S3_BUCKET }}/${{ inputs.target_dir }} --delete

0 comments on commit 0417570

Please sign in to comment.