Skip to content

1.0.0-beta.3

1.0.0-beta.3 #17

Workflow file for this run

name: Generate release assets and deploy
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check if this is a rerun
id: is-rerun
run: |
if [[ "${{ github.run_attempt }}" -gt 1 ]]; then
echo "is_rerun=true" >> $GITHUB_ENV
else
echo "is_rerun=false" >> $GITHUB_ENV
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- run: ./build
- name: Upload RNG
if: env.is_rerun == 'false'
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/dracor.rng
asset_name: dracor-schema-${{ github.event.release.tag_name }}.rng
asset_content_type: application/xml
- name: Upload Schematron
if: env.is_rerun == 'false'
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/dracor.sch
asset_name: dracor-schema-${{ github.event.release.tag_name }}.sch
asset_content_type: application/xml
- name: Upload HTML
if: env.is_rerun == 'false'
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/index.html
asset_name: dracor-guidelines-${{ github.event.release.tag_name }}.html
asset_content_type: text/html
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: dist/
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
id-token: write
pages: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5