Skip to content

Add [skip publish] support to publish workflow (#90) #167

Add [skip publish] support to publish workflow (#90)

Add [skip publish] support to publish workflow (#90) #167

Workflow file for this run

name: Code Validation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Verify generated code is up-to-date
run: |
dotnet run --project Src/Generate
git diff --exit-code || (echo "Generated code is out of date. Run 'dotnet run --project Src/Generate' and commit the results." && exit 1)
- name: Build
run: dotnet build --no-restore -bl
- name: Pack Solution
run: dotnet pack -p:PackageOutputPath="${GITHUB_WORKSPACE}/packages" -p:IncludeSymbols=false -p:RepositoryCommit=${GITHUB_SHA} -p:PackageVersion="0.0.0.1"
- name: Test
run: dotnet test --framework net8.0 --no-build --verbosity normal
- name: Upload Binary Log
uses: actions/upload-artifact@v4
if: always()
with:
name: binary-log
path: msbuild.binlog
- name: Upload Packages
uses: actions/upload-artifact@v4
if: always()
with:
name: nuget-packages
path: packages/*