Update to net7.0 and use latest Bicep versions #48
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: PR Validation | |
on: | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
build-cli: | |
name: Build CLI (${{ matrix.rid }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- rid: win-x64 | |
os: windows-latest | |
- rid: linux-x64 | |
os: ubuntu-latest | |
- rid: osx-x64 | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
- name: Build BicepDocs | |
run: dotnet build --configuration release src/BicepDocs.sln | |
- name: Run tests | |
run: dotnet test --configuration release src/BicepDocs.sln | |
- name: Build binary | |
run: dotnet publish --configuration release --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:TrimmerDefaultAction=copyused -p:SuppressTrimAnalysisWarnings=true -r ${{ matrix.rid }} ./src/BicepDocs.Cli/BicepDocs.Cli.csproj | |
- name: Test samples | |
if: matrix.rid != 'win-x64' | |
run: | | |
mv ./src/BicepDocs.Cli/bin/release/net6.0/${{ matrix.rid }}/publish/bicepdocs . | |
./bicepdocs generate filesystem \ | |
--folderPath docs/formatters/examples/inputs \ | |
--out ./docs/formatters/examples/generated-output/markdown \ | |
--config docs/example-config.yml \ | |
--formatter markdown | |
- name: Test samples (win) | |
if: matrix.rid == 'win-x64' | |
run: | | |
mv .\src\BicepDocs.Cli\bin\release\net6.0\${{ matrix.rid }}\publish\bicepdocs.exe . | |
.\bicepdocs.exe generate filesystem --folderPath docs\formatters\examples\inputs --out .\docs\formatters\examples\generated-output\markdown --config docs\example-config.yml --formatter markdown |