Bump the microsoft group with 1 update (#342) #160
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: Build & Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| fullSemVer: ${{ steps.gitversion.outputs.fullSemVer }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/[email protected] | |
| with: | |
| versionSpec: '6.x' | |
| - name: Determine Version | |
| id: gitversion | |
| uses: gittools/actions/gitversion/[email protected] | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Run tests | |
| run: dotnet test -c Release --no-restore --no-build --verbosity normal | |
| - name: Pack | |
| run: dotnet pack -c Release --no-restore --no-build -o ./nupkg -p:PackageVersion=${{ env.fullSemVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg | |
| - name: Push to NuGet | |
| run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json | |
| create_release: | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| fullSemVer: ${{ needs.build.outputs.fullSemVer }} | |
| steps: | |
| - name: Create Release | |
| uses: ncipollo/[email protected] | |
| with: | |
| skipIfReleaseExists: true | |
| allowUpdates: false | |
| draft: false | |
| makeLatest: true | |
| tag: v${{ env.fullSemVer }} | |
| name: Release v${{ env.fullSemVer }} | |
| generateReleaseNotes: true | |
| body: Release ${{ env.fullSemVer }} of ${{ github.repository }} |