diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 00000000..76d66131 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ci-version-properties": { + "version": "0.4.0", + "commands": [ + "dotnet-ci-version-properties" + ] + } + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ce69e62..8a64662b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,54 @@ -name: Build and test -on: - pull_request: - push: - branches: master -jobs: - test: - name: Build and test - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: Brightspace/third-party-actions@actions/checkout - - uses: Brightspace/third-party-actions@actions/setup-dotnet - - name: Unit tests - run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj - - name: Integration tests - run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj +name: CI + +on: + pull_request: + push: + branches: master + tags: + - v* + +env: + VERSION_PREFIX: 12.3.2 + +jobs: + + linux: + name: Build and test (Linux) + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: Brightspace/third-party-actions@actions/checkout + - uses: Brightspace/third-party-actions@actions/setup-dotnet + + - name: Build + run: dotnet build -c Release --framework net60 + + - name: Unit tests + run: dotnet test -c Release --framework net60 --no-build test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj + - name: Integration tests + run: dotnet test -c Release --framework net60 --no-build test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj + + windows: + name: Build and test (Windows) + runs-on: windows-latest + timeout-minutes: 10 + + steps: + - uses: Brightspace/third-party-actions@actions/checkout + - uses: Brightspace/third-party-actions@actions/setup-dotnet + + - run: dotnet tool restore + - name: Generate version properties + run: dotnet ci-version-properties --output VersionInfo.props && cat VersionInfo.props + + - name: Build + run: dotnet build -c Release + + - name: Test + run: dotnet test -c Release --no-build + + - name: Archive + uses: Brightspace/third-party-actions@actions/upload-artifact + with: + name: D2L.Security.OAuth2.${{ github.sha }} + path: src/**/*.symbols.nupkg diff --git a/D2L.Security.OAuth2.sln b/D2L.Security.OAuth2.sln index 9c987f2c..1ffe41cf 100644 --- a/D2L.Security.OAuth2.sln +++ b/D2L.Security.OAuth2.sln @@ -27,7 +27,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A39E5923-3238-4E59-9E65-45EB5BA2ED19}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig - appveyor.yml = appveyor.yml Directory.Build.props = Directory.Build.props Packages.props = Packages.props EndProjectSection diff --git a/Directory.Build.props b/Directory.Build.props index 75dc08ed..7193db33 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,6 @@  + + D2L D2L Corporation @@ -9,18 +11,6 @@ https://github.com/Brightspace/D2L.Security.OAuth2 - - $(ASSEMBLY_VERSION) - $(ASSEMBLY_VERSION).$(APPVEYOR_BUILD_NUMBER) - $(ASSEMBLY_VERSION).$(APPVEYOR_BUILD_NUMBER) - rc - alpha - - - - 0.0.0-localdev - - 11.0 true diff --git a/README.md b/README.md index 59cb07fe..1c184da7 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,36 @@ -# D2L.Security.OAuth2 - -[![Build status](https://ci.appveyor.com/api/projects/status/id5byt9yitcek417/branch/master?svg=true)](https://ci.appveyor.com/project/Brightspace/d2l-security-oauth2/branch/master) - -.NET libraries for integrating with Brightspace OAuth 2.0. These libraries implement D2L-specific functionality (like validating access tokens, manipulating scope, etc.) and the `jwt-bearer` grant. Most third-party users should use a cross-platform OAuth 2.0 library of their choosing (see the "Client Libraries" section on [this page](https://oauth.net/code/) for examples.) - -## Libraries - -The libraries in this repository are published in lock-step. It is recommended that you maintain a consistent version number on any of these that you depend on. Mixing versions as of the version 5.0 release is not supported. - -### D2L.Security.OAuth2 -[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2/) - -Core functionality for request validation and token provisioning. - -### D2L.Security.OAuth2.WebApi -[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.WebApi.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.WebApi/) - -WebAPI integration in the form of filters/attributes/etc. - -### D2L.Security.OAuth2.TestFramework -[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.TestFramework.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.TestFramework/) - -Helper library for writing tests. - -## Contributing - -1. **Fork** the repository. Committing directly against this repository is - highly discouraged. - -2. Make your modifications in a branch, updating and writing new tests. - -3. Ensure that all tests pass - -4. `rebase` your changes against master. *Do not merge*. - -5. Submit a pull request to this repository. Wait for tests to run and someone - to chime in. +# D2L.Security.OAuth2 + +.NET libraries for integrating with Brightspace OAuth 2.0. These libraries implement D2L-specific functionality (like validating access tokens, manipulating scope, etc.) and the `jwt-bearer` grant. Most third-party users should use a cross-platform OAuth 2.0 library of their choosing (see the "Client Libraries" section on [this page](https://oauth.net/code/) for examples.) + +## Libraries + +The libraries in this repository are published in lock-step. It is recommended that you maintain a consistent version number on any of these that you depend on. Mixing versions as of the version 5.0 release is not supported. + +### D2L.Security.OAuth2 +[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2/) + +Core functionality for request validation and token provisioning. + +### D2L.Security.OAuth2.WebApi +[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.WebApi.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.WebApi/) + +WebAPI integration in the form of filters/attributes/etc. + +### D2L.Security.OAuth2.TestFramework +[![NuGet](https://img.shields.io/nuget/v/D2L.Security.OAuth2.TestFramework.svg?maxAge=7200)](https://www.nuget.org/packages/D2L.Security.OAuth2.TestFramework/) + +Helper library for writing tests. + +## Contributing + +1. **Fork** the repository. Committing directly against this repository is + highly discouraged. + +2. Make your modifications in a branch, updating and writing new tests. + +3. Ensure that all tests pass + +4. `rebase` your changes against master. *Do not merge*. + +5. Submit a pull request to this repository. Wait for tests to run and someone + to chime in. diff --git a/VersionInfo.props b/VersionInfo.props new file mode 100644 index 00000000..4a91a341 --- /dev/null +++ b/VersionInfo.props @@ -0,0 +1,5 @@ + + + 0.0.0-dev + + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f455bf09..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ - -image: Visual Studio 2022 - -version: '{build}-{branch}' -environment: - ASSEMBLY_VERSION: 12.3.2 - -configuration: Release -platform: Any CPU - -before_build: - - dotnet restore - - nuget install Appveyor.TestLogger -Version 2.0.0 - -build_script: - - dotnet build --configuration %CONFIGURATION% -- - -test_script: - - dotnet test --configuration %CONFIGURATION% --no-build --logger AppVeyor --test-adapter-path . - -artifacts: -- path: '**\*.nupkg' - name: NuGet - -branches: - only: - - master - - /v\d*\.\d*\.\d*.\d*/