Skip to content

Add nuget push step #23

Add nuget push step

Add nuget push step #23

Workflow file for this run

name: Dev release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['9.0.x']
steps:
- uses: actions/checkout@v2
- name: Setup .NET Code SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore
- name: Test
run: dotnet test --no-restore --collect:"XPlat Code Coverage"
- name: Set build label
run: echo "DEVLABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Build analyzers
run: dotnet build src/analyzers/ -c Release --no-restore -o analyzers
- name: Build source generator
run: dotnet build src/source-generator/ -c Release --no-restore -o analyzers
- name: Pack core library
run: dotnet pack src/lib -c Release --no-restore -p:VersionSuffix=dev.${{ env.DEVLABEL }}.${{ github.run_number }} -o ./pack
- name: Publish packages to NuGet
run: dotnet nuget push ./pack/*[^.symbols].nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_PUSH_KEY }}