Merge branch 'main' of https://github.com/chronic-care/covid-ed-ig #168
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
name: Build and Publish Packaged Release | |
on: | |
push: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-and-publish-new-release: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.tag-with-incremented-patch-version.outputs.TAG }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: "@OWNER" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '8' | |
- uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: '2.7' | |
- name: Install Jekyll | |
run: | | |
gem install bundler | |
bundle install | |
- name: Update Publisher executable | |
run: bash _updatePublisher.sh --force --yes | |
- name: Generate Implementation Guide (IG) | |
run: bash _genonce.sh | |
- name: Install NPM modules in root directory | |
run: npm ci | |
- name: Localize cql libraries | |
run: | | |
node localizeLibraryPaths.js ./output/*-2.json | |
- name: Install NPM modules in cql-unit-test | |
run: cd cql-unit-tests && npm ci | |
- name: Run CQL Unit Tests using JavaScript Engine | |
run: cd cql-unit-tests && npm test | |
- name: Tag with Incremented Patch Version | |
id: tag-with-incremented-patch-version | |
run: | | |
echo "Fetching git tags" | |
git fetch --prune --unshallow --tags | |
echo "Tagging with incremented patch number" | |
bash ./scripts/tag_git_dev.sh | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: chronic-care/chronic-care.github.io | |
publish_branch: master | |
destination_dir: covid-ed-ig | |
publish_dir: ./output | |
- name: Publish to Package Repository | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: bash _publishToRepo.sh --release-version ${{ steps.tag-with-incremented-patch-version.outputs.TAG }} |