Skip to content

Merge pull request #50 from ChrisPulman/renovate/roslynator.analyzers… #29

Merge pull request #50 from ChrisPulman/renovate/roslynator.analyzers…

Merge pull request #50 from ChrisPulman/renovate/roslynator.analyzers… #29

Workflow file for this run

name: SerialPortRx CI-Build
on:
push:
branches: [ "master" ]
jobs:
build-and-release:
runs-on: windows-2022
environment:
name: release
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET 6/7/8
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- 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/create-release@v1.1.4
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