Skip to content

Bump System.Text.Json from 8.0.3 to 8.0.4 #173

Bump System.Text.Json from 8.0.3 to 8.0.4

Bump System.Text.Json from 8.0.3 to 8.0.4 #173

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ published ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore
- name: Pack (non-release)
if: github.event_name != 'release'
run: dotnet pack -c Release
- name: Pack and push to nuget.org (release)
if: github.event_name == 'release'
run: |
vertag=(${GITHUB_REF//\// })
VERSION="${vertag[2]}"
[[ "${VERSION:0:1}" == "v" ]] && VERSION="${VERSION:1}"
[[ "$VERSION" =~ ^[1-9][0-9]*\.[0-9]+\.[0-9]+(-[a-z0-9]+\.[0-9]+|)$ ]] || (echo "Incorrect version! ($VERSION)"; exit 1)
dotnet pack -c Release -p:PackageVersion="$VERSION" -o nupkg src/ZCS.DataContractResolver/ZCS.DataContractResolver.csproj
dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}}