diff --git a/.github/workflows/buildAndDeploy.yml b/.github/workflows/buildAndDeploy.yml new file mode 100644 index 0000000..17d3694 --- /dev/null +++ b/.github/workflows/buildAndDeploy.yml @@ -0,0 +1,91 @@ +name: Build and Test + +on: + workflow_dispatch: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + env: + solutionName: UriTemplates.sln + outputFolder: ./buildArtifacts + + steps: + - name: Checkout repository + uses: actions/checkout@v3.0.2 + with: + submodules: true + + - name: Setup .NET + uses: actions/setup-dotnet@v2.1.0 + with: + dotnet-version: 6.0.x + + - name: Restore dependencies + run: dotnet restore ${{ env.solutionName }} + + - name: Build + run: dotnet build ${{ env.solutionName }} --no-restore -c Release + + - name: Test + run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=./TestResults/ /p:CoverletOutputFormat=opencover + + - name: Pack + run: dotnet pack ${{ env.solutionName }} /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg --no-build --output ${{ env.outputFolder }} -c Release + + - name: Upload Nuget Package and Symbols + uses: actions/upload-artifact@v2 + with: + name: drop + path: | + ${{ env.outputFolder }}/*.nupkg + ${{ env.outputFolder }}/*.snupkg + + analyze: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3.0.2 + with: + submodules: true + + - name: Setup .NET + uses: actions/setup-dotnet@v2.1.0 + with: + dotnet-version: 6.0.x + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: csharp + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + + deploy: + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + environment: + name: production + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v2.1.0 + with: + dotnet-version: 6.0.x + + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + name: drop + + - name: Nuget push + run: dotnet nuget push "*.nupkg" --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{ secrets.PUBLISH_GH_TOKEN }} + diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5029309..f32415e 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,10 +1,13 @@ # Uri Templates # +##2.0.0 +- [Breaking] Updated Target Framework Moniker to `netstandard2.0` and drops `net35`, `net40`, `net45` and `netstandard1.0`. + ##1.1.2 - Added Type converter support ##1.1.1 -- Fixed bug parsing query paranmeter with comma delimited values +- Fixed bug parsing query parameter with comma delimited values ##1.1.0 @@ -30,7 +33,7 @@ ##0.6.3 -- Added ToString() overload to allow retreiving unresolved template +- Added ToString() overload to allow retrieving unresolved template ##0.6.2 diff --git a/UriTemplateKey.snk b/UriTemplateKey.snk new file mode 100644 index 0000000..7e529ee Binary files /dev/null and b/UriTemplateKey.snk differ diff --git a/src/UriTemplateTests/UriTemplateTests.csproj b/src/UriTemplateTests/UriTemplateTests.csproj index 9aa8c18..066a781 100644 --- a/src/UriTemplateTests/UriTemplateTests.csproj +++ b/src/UriTemplateTests/UriTemplateTests.csproj @@ -1,7 +1,7 @@ - + - net5.0 + net6.0 false diff --git a/src/UriTemplates/UriTemplates.csproj b/src/UriTemplates/UriTemplates.csproj index ce2bb5e..e73d35c 100644 --- a/src/UriTemplates/UriTemplates.csproj +++ b/src/UriTemplates/UriTemplates.csproj @@ -1,7 +1,6 @@  - - net35;net40;net45;netstandard1.0;netstandard2.0 + netstandard2.0 true Tavis Tavis.UriTemplates @@ -14,10 +13,22 @@ https://github.com/tavis-software/Tavis.UriTemplates Apache-2.0 git + true + https://github.com/tavis-software/Tavis.UriTemplates + true + true + ../../UriTemplateKey.snk + + + + DEBUG;TRACE;TYPE_CONVERTER + + true +