Skip to content

schema-generation

schema-generation #153

# This is a basic workflow to help you get started with Actions
name: schema-generation
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
generate-schema:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get SHA
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
- name: Download the file
id: downloadfile
run: |
mkdir build
$urlPath = "https://thc.lyforms.com/documents/thc/public/IfcDocLite"
$path = "${{ github.workspace }}\build\IfcDocLite"
Invoke-WebRequest -URI $urlPath -OutFile $path
Expand-Archive $path -DestinationPath "${{ github.workspace }}\build\"
- name: Run schema generation
run: |
echo 'Workspace directory is ${{ github.workspace }}'
echo 'Home directory is $HOME'
& "${{ github.workspace }}\build\IfcDocLite.exe" "${{ github.workspace }}\IFC4x3" -FE "${{ env.SHORT_SHA }}"
- name: Upload schema
uses: actions/upload-artifact@v3
with:
name: IFC Schema
path: ${{ github.workspace }}\schema