Upgrade all dotnet packages to latest #366
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: .NET | |
| on: | |
| push: | |
| branches: [ master ] | |
| create: | |
| tags: | |
| - '*.*.*' | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Check Tag | |
| id: check-tag | |
| run: | | |
| if [[ v${{ github.event.ref }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| echo "match=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Debug | |
| - name: Test | |
| run: dotnet test test/NosCore.Shared.Tests --no-build --configuration Debug --verbosity normal | |
| - name: Build Artifact | |
| if: steps.check-tag.outputs.match == 'true' | |
| id: build_artifact | |
| run: | | |
| dotnet restore | |
| dotnet build -c Release | |
| dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg | |
| dotnet nuget push /tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} | |
| echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT | |
| echo "ARTIFACT_NAME=NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| if: steps.check-tag.outputs.match == 'true' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ steps.build_artifact.outputs.ARTIFACT_PATH }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |