-
-
Notifications
You must be signed in to change notification settings - Fork 16
70 lines (59 loc) · 2.25 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: hdfview publishrelease
# Triggers the workflow on demand
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
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 hdfview release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdfview'
version: 'tags/${{ inputs.use_tag }}'
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_tag }}'
regex: true
target: 'HDFVIEW/'
file: 'UsersGuide.*'
- name: List files for the space
run: |
ls -l ${{ github.workspace }}
ls ${{ github.workspace }}/HDFVIEW
- 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 ./HDFVIEW s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/downloads --delete
- name: Uncompress source (Linux)
run: tar -zxvf ${{ github.workspace }}/HDFVIEW/UsersGuide.tar.gz
- name: Sync userguide to S3 bucket
run: |
aws s3 sync ./UsersGuide s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation/UsersGuide --delete