Merge pull request #94 from ChrisPulman/renovate/roslynator.analyzers… #69
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: SerialPortRx CI-Build | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-2025 | |
| environment: | |
| name: release | |
| outputs: | |
| nbgv: ${{ steps.nbgv.outputs.SemVer2 }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
| - name: Setup .NET (With cache) | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| dotnet-quality: 'preview' | |
| cache: true | |
| cache-dependency-path: | | |
| **/Directory.Packages.props | |
| **/*.sln | |
| **/*.csproj | |
| **/global.json | |
| **/nuget.config | |
| - name: NBGV | |
| id: nbgv | |
| uses: dotnet/nbgv@master | |
| with: | |
| setAllVars: true | |
| - run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}' | |
| - name: NuGet Restore | |
| run: dotnet restore SerialPortRx.sln | |
| working-directory: src | |
| - name: Build | |
| run: dotnet pack --no-restore --configuration Release SerialPortRx.sln | |
| working-directory: src | |
| - name: Create NuGet Artifacts | |
| uses: actions/upload-artifact@master | |
| with: | |
| name: nuget | |
| path: '**/*.nupkg' | |
| - name: Changelog | |
| uses: glennawatson/ChangeLog@v1 | |
| id: changelog | |
| - name: Create Release | |
| uses: actions/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
| with: | |
| tag_name: ${{ steps.nbgv.outputs.SemVer2 }} | |
| release_name: ${{ steps.nbgv.outputs.SemVer2 }} | |
| body: | | |
| ${{ steps.changelog.outputs.commitLog }} | |
| - name: NuGet Push | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} | |
| SOURCE_URL: https://api.nuget.org/v3/index.json | |
| run: | | |
| dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg --skip-duplicate |