Bump MSTest.TestFramework from 4.3.3 to 4.4.0 #249
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: .NET | |
| on: | |
| push: | |
| branches: [ master ] | |
| tags: | |
| - '*.*.*' | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Run Unit Tests | |
| run: | | |
| dotnet restore | |
| dotnet build | |
| dotnet test test/NosCore.Algorithm.Tests -v m | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Check Tag | |
| id: check-tag | |
| run: | | |
| if [[ "$GITHUB_REF" =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+$ ]]; then | |
| echo "match=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Pack and push to NuGet | |
| if: steps.check-tag.outputs.match == 'true' | |
| id: build_artifact | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| dotnet restore | |
| dotnet build -c Release | |
| dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion=${TAG_NAME} | |
| dotnet nuget push /tmp/nupkgs/NosCore.Algorithm.${TAG_NAME}.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} | |
| echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Algorithm.${TAG_NAME}.nupkg" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| if: steps.check-tag.outputs.match == 'true' | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: ${{ steps.build_artifact.outputs.ARTIFACT_PATH }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |