1.2.0 #31
Workflow file for this run
This file contains hidden or 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: dotnet-release | |
| on: | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: write | |
| issues: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: retrieve version | |
| id: version | |
| run: echo "NUGET_PKG_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
| - name: install | |
| run: dotnet restore | |
| - name: format | |
| run: dotnet format --verify-no-changes --no-restore | |
| - name: build | |
| run: dotnet build -c Release | |
| - name: test | |
| run: dotnet test --no-restore --nologo -c Release | |
| - name: create nuget packages | |
| run: dotnet pack --no-restore --nologo --no-build -p:PackageOutputPath='./publish' -c Release -p:PackageVersion=${NUGET_PKG_VERSION} -p:PublicRelease=true -p:SymbolPackageFormat=snupkg --include-symbols --include-source | |
| - name: publish nuget packages | |
| run: dotnet nuget push "**/publish/*.nupkg" -s 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} |