Release new package #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
# publish on ig | |
name: Release new package | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get IG-website-release | |
uses: actions/checkout@main | |
with: | |
persist-credentials: false | |
repository: ansforge/IG-website-release | |
path: IG-website-release | |
- name: Init | |
run: | | |
cd IG-website-release | |
git submodule update --init --recursive | |
- uses: actions/checkout@v3 | |
with: | |
path: igRepo | |
# Install .NET runtime | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '6.x.x' | |
# Install Java runtime (only needed if you want to run the offical HL7 Java validator) | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'microsoft' | |
java-version: '17' | |
- name : firely | |
run : dotnet tool install --global Firely.Terminal --version 3.0.0 | |
- name: Check Firely Terminal Version | |
run: | | |
CHECK_FIRELY_TERMINAL_VERSION=$(fhir -v | tr '\n' ' ') # Print everything in a single line | |
echo "FIRELY_TERMINAL_VERSION: $CHECK_FIRELY_TERMINAL_VERSION" | |
- name: Run bake hl7.fhir.fr.core | |
run: | | |
fhir install hl7.fhir.fr.core 1.1.0 | |
fhir bake --package hl7.fhir.fr.core | |
# Persist the FHIR Package Cache between runners. | |
# Doc: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache | |
- name: 🗂️ Cache FHIR Packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.fhir/packages | |
key: fhir-packages | |
- name: Install Sushi | |
run: npm install -g fsh-sushi | |
- name: Install ruby and jekyll | |
run: | | |
sudo apt-get install ruby-full | |
sudo gem install jekyll | |
# Downloads the newest version of the IG Publisher, this could probable be cached. | |
- name: 📥 Download IG Publisher | |
run: wget -q https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar | |
- name: Run sushi | |
run: sushi igRepo | |
- name: 🏃♂️ Run IG Publisher | |
run : java -Xmx8192m -jar publisher.jar publisher -ig igRepo/. | |
# Builds the HTML page for the IG. | |
- name: 🏃♂️ Generate package registry | |
run : java -Dfile.encoding=UTF-8 -jar publisher.jar -generate-package-registry ./IG-website-release | |
- name: 🏃♂️ Run Publisher to release | |
run : java -Dfile.encoding=UTF-8 -jar publisher.jar -go-publish -source igRepo -web ./IG-website-release/www/ig -registry ./IG-website-release/ig-registry/fhir-ig-list.json -history ./IG-website-release/fhir-ig-history-template -templates ./IG-website-release/templates | |
- name: Commit change on IG-website-release | |
run: | | |
cd IG-website-release | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add -A | |
git commit -m updated | |
- name: Push changes on IG-website-release | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.ANS_IG_API_TOKEN }} | |
directory: IG-website-release | |
repository : ansforge/IG-website-release | |
force : true |