Refactor ListWrappers to introduce IListWithRangeAdd interface an…
#25
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| - "v*-beta*" | |
| - "v*-alpha*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.0.x' | |
| # Remove the "V" from the tay for NUGET package version | |
| - name: Extract version from tag | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Restore dependencies | |
| run: dotnet restore Source/Porticle.Grpc.sln | |
| - name: Build project | |
| run: dotnet build Source/Porticle.Grpc.sln --configuration Release --no-restore | |
| - name: Run tests | |
| run: dotnet test Source/Porticle.Grpc.UnitTests/Porticle.Grpc.UnitTests.csproj --configuration Release --no-build --verbosity normal | |
| - name: Pack NuGet package | |
| run: dotnet pack Source/Porticle.Grpc.TypeMapper/Porticle.Grpc.TypeMapper.csproj --configuration Release --no-build --output ./nuget --property:PackageVersion=${{ env.VERSION }} | |
| - name: Publish NuGet package | |
| run: dotnet nuget push ./nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ env.VERSION }} | |
| name: Release v${{ env.VERSION }} | |
| body: "Nuget Release für Porticle.Grpc.TypeMapper v${{ env.VERSION }}." | |
| files: ./nuget/*.nupkg | |
| draft: false | |
| prerelease: ${{ contains(env.VERSION, '-beta') || contains(env.VERSION, '-alpha') || contains(env.VERSION, '-rc') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |