diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..04d1f1a0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,67 @@ +name: build + +on: + push: + branches: [ dev, rel/* ] + tags: [ '*' ] + pull_request: + branches: [ dev, rel/* ] + +jobs: + build: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ macos-latest, ubuntu-latest, windows-latest ] + include: + - os: macos-latest + os_name: macos + - os: ubuntu-latest + os_name: linux + - os: windows-latest + os_name: windows + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v1 + + - name: Build, test and pack + run: eng\common\CIBuild.cmd -configuration Release -prepareMachine -integrationTest + if: ${{ runner.os == 'Windows' }} + + - name: Build, test and pack + shell: pwsh + run: ./eng/common/cibuild.sh -configuration Release -prepareMachine -integrationTest + if: ${{ runner.os != 'Windows' }} + + - name: Publish logs + uses: actions/upload-artifact@v1 + with: + name: logs-${{ matrix.os_name }} + path: ./artifacts/log/Release + + - name: Publish NuGet packages + uses: actions/upload-artifact@v1 + with: + name: packages-${{ matrix.os_name }} + path: ./artifacts/packages/Release/Shipping + + - name: Publish test results + uses: actions/upload-artifact@v1 + with: + name: testresults-${{ matrix.os_name }} + path: ./artifacts/TestResults/Release + + - name: Push NuGet packages to MyGet.org + run: dotnet nuget push "artifacts\packages\Release\Shipping\*.nupkg" --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/openiddict/ --symbol-source https://www.myget.org/F/openiddict/ + if: ${{ github.repository_owner == 'openiddict' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && runner.os == 'Windows' }} + + - name: Push NuGet packages to NuGet.org + run: dotnet nuget push "artifacts\packages\Release\Shipping\*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json + if: ${{ github.repository_owner == 'openiddict' && startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d0a4d5bb..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: csharp -mono: none -dist: xenial -addons: - apt: - packages: - - gettext - - libcurl4-openssl-dev - - libicu-dev - - libssl-dev - - libunwind8 - - zlib1g -env: - global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -os: - - linux - - osx -osx_image: xcode8.2 -script: - - ./eng/common/cibuild.sh -configuration Release -prepareMachine -integrationTest \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index d3047adb..8470e50a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -49,21 +49,21 @@ - + <_Hours>$([MSBuild]::Multiply($([System.DateTime]::Now.ToString(HH)), 4)) <_QuarterHours>$([MSBuild]::Divide($([System.DateTime]::Now.ToString(mm)), 15)) <_QuarterHours>$([System.Math]::Floor($(_QuarterHours))) - <_AppVeyorBuildRevision>$([MSBuild]::Add($(_Hours), $(_QuarterHours))) - <_AppVeyorBuildRevision>$([MSBuild]::Add($(_AppVeyorBuildRevision), 1)) + <_GitHubActionsBuildRevision>$([MSBuild]::Add($(_Hours), $(_QuarterHours))) + <_GitHubActionsBuildRevision>$([MSBuild]::Add($(_GitHubActionsBuildRevision), 1)) true - $([System.DateTime]::Now.ToString(yyyyMMdd)).$(_AppVeyorBuildRevision) + $([System.DateTime]::Now.ToString(yyyyMMdd)).$(_GitHubActionsBuildRevision) diff --git a/README.md b/README.md index 0dbe3e65..1fb945a4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # OpenIddict ### The OpenID Connect stack you'll be addicted to. -[![Build status](https://ci.appveyor.com/api/projects/status/46ofo2eusje0hcw2/branch/dev?svg=true)](https://ci.appveyor.com/project/openiddict/openiddict-core/branch/dev) -[![Build status](https://travis-ci.org/openiddict/openiddict-core.svg?branch=dev)](https://travis-ci.org/openiddict/openiddict-core) +[![Build status](https://github.com/openiddict/openiddict-core/workflows/build/badge.svg?branch=dev&event=push)](https://github.com/openiddict/openiddict-core/actions?query=workflow%3Abuild+branch%3Adev+event%3Apush) ## What's OpenIddict? diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index b4edc7e5..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '{build}' -image: Visual Studio 2017 - -build_script: -- cmd: eng\common\cibuild.cmd -configuration Release -prepareMachine -integrationTest - -test: off - -artifacts: -- path: artifacts\packages\Release\Shipping\*.nupkg - name: NuGet - -deploy: -- provider: NuGet - server: https://www.myget.org/F/openiddict/api/v2/package - api_key: - secure: 0ZVg9vnH4PzTu0CXjTZyDmvvzPMt1R8Yl1ObxleO8dAMk6M1AqmU3YmoaQkc2VNi - skip_symbols: false - symbol_server: https://www.myget.org/F/openiddict/api/v2/package \ No newline at end of file