Skip to content

Fix doc build warnings #1

Fix doc build warnings

Fix doc build warnings #1

Workflow file for this run

name: CD
on:
push:
tags:
- "v*.*.*"
env:
DOTNET_VERSION: "9.0"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.20"
- name: Install cpp
run: sudo apt-get update && sudo apt-get install -y gcc
- name: Restore dotnet tools
run: dotnet tool restore
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
- name: Update project version
run: |
sed -i "s/<Version>.*<\/Version>/<Version>${{ steps.get_version.outputs.VERSION }}<\/Version>/" OpenLanguage/OpenLanguage.csproj
- name: Build and package
run: |
cmake --build build --target process
cmake --build build --target build
cmake --build build --target publish
- name: Generate documentation
run: |
cmake --build build --target doc
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
generate_release_notes: true
files: |
build/packages/*.nupkg
build/docs/site/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NuGet
run: |
dotnet nuget push build/packages/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Deploy documentation to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/site
destination_dir: docs/${{ steps.get_version.outputs.VERSION }}
- name: Update latest docs symlink
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/site
destination_dir: docs/latest