Skip to content

Merge pull request #28 from fsprojects/003-recursive-types #93

Merge pull request #28 from fsprojects/003-recursive-types

Merge pull request #28 from fsprojects/003-recursive-types #93

Workflow file for this run

name: CI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build, test, and pack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use dotnet CLI 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Use dotnet CLI 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
dotnet-quality: "preview"
- name: Build
run: |
dotnet restore
dotnet build -c Release --no-restore
- name: Test net8.0
run: dotnet test -c Release --no-restore --no-build --framework net8.0 --logger "GitHubActions;report-warnings=false"
- name: Test net9.0
run: dotnet test -c Release --no-restore --no-build --framework net9.0 --logger "GitHubActions;report-warnings=false"
- name: Test net10.0
run: dotnet test -c Release --no-restore --no-build --framework net10.0 --logger "GitHubActions;report-warnings=false"
- name: Pack
run: dotnet pack -c Release --no-restore --include-symbols -o out
- name: Verify packages
run: |
ls -la out/*.nupkg
echo "Expected 3 packages (Core, main, OpenApi) + 3 snupkg"
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: verify-test-results
path: |
**/*.received.*
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nupkg
path: ./out
- name: Push
if: startsWith( github.ref, 'refs/tags/v' )
env:
API_KEY: ${{ secrets.NUGET_API_KEY }}
SOURCE: "https://api.nuget.org/v3/index.json"
run: |
for pkg in ./out/*.nupkg; do
dotnet nuget push "$pkg" --skip-duplicate --no-symbols --source $SOURCE --api-key $API_KEY
done