summaryrefslogtreecommitdiffstats
path: root/.github/workflows/release.yml
blob: 26c08a90259d73bb468fbfa3f5719df5605e33e3 (plain)
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
name: hdf5 1.12 release build

# Controls when the action will run. Triggers the workflow on a manual run
on:
  workflow_dispatch:
    inputs:
      use_tag:
        description: 'Release version tag'
        type: string
        required: false
        default: snapshot-1.12
      use_environ:
        description: 'Environment to locate files'
        type: choice
        required: true
        default: snapshots
        options:
        - snapshots
        - release

permissions:
  contents: read

# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
jobs:
  log-the-inputs:
    runs-on: ubuntu-latest
    steps:
      - run: |
          echo "Tag: $TAG"
          echo "Environment: $ENVIRONMENT"
        env:
          TAG: ${{ inputs.tag }}
          ENVIRONMENT: ${{ inputs.environment }}

  call-workflow-tarball:
    needs: log-the-inputs
    uses: ./.github/workflows/tarball.yml
    with:
      use_tag: ${{ inputs.use_tag }}
      use_environ: ${{ inputs.use_environ }}

  call-workflow-ctest:
    needs: call-workflow-tarball
    uses: ./.github/workflows/cmake-ctest.yml
    with:
      file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
      use_tag: ${{ inputs.use_tag }}
      use_environ: ${{ inputs.use_environ }}

  call-workflow-release:
    needs: [call-workflow-tarball, call-workflow-ctest]
    permissions:
      contents: write # In order to allow tag creation
    uses: ./.github/workflows/release-files.yml
    with:
      file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
      file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
      file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
      use_tag: ${{ inputs.use_tag }}
      use_environ: ${{ inputs.use_environ }}