-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (60 loc) · 2.15 KB
/
ig-publish.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: ImplementationGuide Publisher
on:
# Triggers the workflow on push or pull request events but only for the main or master branch
push:
branches:
- main
- master
- staging
pull_request:
branches:
- main
- master
- staging
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run-publisher:
runs-on: ubuntu-latest
steps:
# checkout
- uses: actions/checkout@v3
# read id, version and canonical from sushi-config.yaml
- name: Run read-yaml action
id: yaml-data
uses: CumulusDS/[email protected]
with:
file: sushi-config.yaml
version: version
canonical: canonical
id: id
# display outputs from read-yaml action
- name: Display read-yaml output
run: |
echo "id: ${{ steps.yaml-data.outputs.id }}"
echo "target url: ${{ steps.yaml-data.outputs.canonical }}"
echo "version: ${{ steps.yaml-data.outputs.version }}"
# run ig publisher
- name: Run the IG publisher
uses: docker://hl7fhir/ig-publisher-base:latest
with:
args: ./run-ig-publisher.sh ${{ steps.yaml-data.outputs.canonical }} ${{ steps.yaml-data.outputs.version }}
# deploy implementation guide to github pages
- name: Deploy
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
force_orphan: true
# upload binaries to release
- name: Upload binaries to release
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./output/package.tgz
asset_name: ${{ steps.yaml-data.outputs.id }}-${{ steps.yaml-data.outputs.version }}.tgz
tag: v${{ steps.yaml-data.outputs.version }}
release_name: Release v${{ steps.yaml-data.outputs.version }}
overwrite: true