This repository has been archived by the owner on May 25, 2024. It is now read-only.
ci: fix everything ? #4
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
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-api-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p site/ | |
- uses: docker://asyncapi/github-action-for-generator:2.1.12 | |
with: | |
filepath: docs/api/asyncapi.yaml | |
template: '@asyncapi/[email protected]' | |
output: site/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}-api-docs-${{ github.sha }} | |
path: site/ | |
build-host: | |
strategy: | |
matrix: | |
runtime: | |
- linux-arm | |
- linux-arm64 | |
- ubuntu-x64 | |
- win-arm64 | |
- win-x64 | |
- win-x86 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- run: | | |
dotnet publish src/EdcHost/EdcHost.csproj -c Release -o bin \ | |
--sc false -r ${{ matrix.runtime }} -p:DebugType=none \ | |
-p:PublishSingleFile=true | |
working-directory: host | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}-host-${{ matrix.runtime }}-${{ github.sha }} | |
path: host/bin | |
build-viewer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- run: | | |
npm ci | |
working-directory: viewer | |
- run: | | |
npm run build | |
working-directory: viewer | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}-viewer-${{ github.sha }} | |
path: viewer/build | |
build-pages: | |
needs: | |
- build-api-docs | |
- build-viewer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: api-docs-${{ github.sha }} | |
path: site/api | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}-viewer-${{ github.sha }} | |
path: site/viewer | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
check-style-host: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- run: dotnet format --verify-no-changes src/EdcHost | |
working-directory: host | |
- run: dotnet format --verify-no-changes src/EdcHost.Tests | |
working-directory: host | |
deploy-pages: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build-pages | |
permissions: | |
id-token: write | |
pages: write | |
runs-on: ubuntu-latest | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v4 | |
test-host: | |
strategy: | |
matrix: | |
runs-on: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- run: | | |
dotnet test src/EdcHost.Tests/EdcHost.Tests.csproj | |
working-directory: host |