Skip to content

Commit e20d238

Browse files
Switch to GitHub Actions for CI
Add workflow for GitHub Actions CI. Remove AppVeyor and Travis CIs.
1 parent 6efbf74 commit e20d238

File tree

6 files changed

+80
-60
lines changed

6 files changed

+80
-60
lines changed

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ dev, rel/* ]
6+
tags: [ '*' ]
7+
pull_request:
8+
branches: [ dev, rel/* ]
9+
10+
jobs:
11+
build:
12+
name: ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ macos-latest, ubuntu-latest, windows-latest ]
19+
include:
20+
- os: macos-latest
21+
os_name: macos
22+
- os: ubuntu-latest
23+
os_name: linux
24+
- os: windows-latest
25+
os_name: windows
26+
27+
steps:
28+
29+
- name: Checkout code
30+
uses: actions/checkout@v2
31+
32+
- name: Setup .NET Core SDK
33+
uses: actions/setup-dotnet@v1
34+
35+
- name: Build, Test and Package
36+
run: eng\common\CIBuild.cmd -configuration Release -prepareMachine
37+
if: ${{ runner.os == 'Windows' }}
38+
39+
- name: Build, Test and Package
40+
shell: pwsh
41+
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine
42+
if: ${{ runner.os != 'Windows' }}
43+
44+
- name: Publish logs
45+
uses: actions/upload-artifact@v1
46+
with:
47+
name: logs-${{ matrix.os_name }}
48+
path: ./artifacts/log/Release
49+
50+
- name: Publish NuGet packages
51+
uses: actions/upload-artifact@v1
52+
with:
53+
name: packages-${{ matrix.os_name }}
54+
path: ./artifacts/packages/Release/Shipping
55+
56+
- name: Publish test results
57+
uses: actions/upload-artifact@v1
58+
with:
59+
name: testresults-${{ matrix.os_name }}
60+
path: ./artifacts/TestResults/Release
61+
62+
- name: Push NuGet packages to aspnet-contrib MyGet
63+
run: dotnet nuget push "artifacts\packages\Release\Shipping\*.nupkg" --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/aspnet-contrib/ --symbol-source https://www.myget.org/F/aspnet-contrib/
64+
if: ${{ (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && runner.os == 'Windows' }}
65+
66+
- name: Push NuGet packages to NuGet.org
67+
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
68+
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }}

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

AspNet.Security.OAuth.Providers.sln

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
114114
.editorconfig = .editorconfig
115115
.gitattributes = .gitattributes
116116
.gitignore = .gitignore
117-
.travis.yml = .travis.yml
118-
appveyor.yml = appveyor.yml
119117
AspNet.Security.OAuth.Providers.ruleset = AspNet.Security.OAuth.Providers.ruleset
120118
build.cmd = build.cmd
121119
build.ps1 = build.ps1
@@ -192,6 +190,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Basec
192190
EndProject
193191
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Okta", "src\AspNet.Security.OAuth.Okta\AspNet.Security.OAuth.Okta.csproj", "{F8A4A5C4-86D9-4CF2-A2FC-3B46CCC51750}"
194192
EndProject
193+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B1792D2A-6D6C-4484-968E-D68DF376BA40}"
194+
ProjectSection(SolutionItems) = preProject
195+
.github\workflows\build.yml = .github\workflows\build.yml
196+
EndProjectSection
197+
EndProject
195198
Global
196199
GlobalSection(SolutionConfigurationPlatforms) = preSolution
197200
Debug|Any CPU = Debug|Any CPU
@@ -528,6 +531,7 @@ Global
528531
{C2CA4B38-AA21-4CA4-8799-2E8C8C06754F} = {E9DAB098-A902-4EF5-9AEE-CF735DF31E35}
529532
{42306484-B2BF-4B52-B950-E0CDFA58B02A} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
530533
{F8A4A5C4-86D9-4CF2-A2FC-3B46CCC51750} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
534+
{B1792D2A-6D6C-4484-968E-D68DF376BA40} = {3FA3F7B5-5373-4E43-8F45-8EC18249E526}
531535
EndGlobalSection
532536
GlobalSection(ExtensibilityGlobals) = postSolution
533537
SolutionGuid = {C7B54DE2-6407-4802-AD9C-CE54BF414C8C}

Directory.Build.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@
2323
</PropertyGroup>
2424

2525
<!--
26-
Arcade only allows the revision to contain up to two characters, and AppVeyor does not roll-over
26+
Arcade only allows the revision to contain up to two characters, and GitHub Actions does not roll-over
2727
build numbers every day like Azure DevOps does. To balance these two requirements, set the official
2828
build ID to be the same format as the built-in default from Arcade, except with the revision number
2929
being the number of the quarter hour of the current time of day (24 * 4 = 96, which is less than 100).
3030
So a build between 00:00 and 00:14 would have a revision of 1, and a build between 23:45 and 23:59:59
3131
would have a revision of 97.
3232
-->
3333

34-
<PropertyGroup Condition=" '$(APPVEYOR)' == 'True' AND '$(APPVEYOR_PULL_REQUEST_NUMBER)' == '' ">
34+
<PropertyGroup Condition=" '$(GITHUB_ACTIONS)' == 'true' AND '$(GITHUB_REF.StartsWith(`refs/pull/`))' == 'false' ">
3535
<_Hours>$([MSBuild]::Multiply($([System.DateTime]::Now.ToString(HH)), 4))</_Hours>
3636
<_QuarterHours>$([MSBuild]::Divide($([System.DateTime]::Now.ToString(mm)), 15))</_QuarterHours>
3737
<_QuarterHours>$([System.Math]::Floor($(_QuarterHours)))</_QuarterHours>
38-
<_AppVeyorBuildRevision>$([MSBuild]::Add($(_Hours), $(_QuarterHours)))</_AppVeyorBuildRevision>
39-
<_AppVeyorBuildRevision>$([MSBuild]::Add($(_AppVeyorBuildRevision), 1))</_AppVeyorBuildRevision>
38+
<_GitHubActionsBuildRevision>$([MSBuild]::Add($(_Hours), $(_QuarterHours)))</_GitHubActionsBuildRevision>
39+
<_GitHubActionsBuildRevision>$([MSBuild]::Add($(_GitHubActionsBuildRevision), 1))</_GitHubActionsBuildRevision>
4040
<OfficialBuild>true</OfficialBuild>
41-
<OfficialBuildId Condition=" '$(OfficialBuild)' == 'true' ">$([System.DateTime]::Now.ToString(yyyyMMdd)).$(_AppVeyorBuildRevision)</OfficialBuildId>
41+
<OfficialBuildId Condition=" '$(OfficialBuild)' == 'true' ">$([System.DateTime]::Now.ToString(yyyyMMdd)).$(_GitHubActionsBuildRevision)</OfficialBuildId>
4242
</PropertyGroup>
4343

4444
<PropertyGroup>

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
**The latest official release can be found on [NuGet](https://www.nuget.org/profiles/aspnet-contrib) and the nightly builds on [MyGet](https://www.myget.org/gallery/aspnet-contrib)**.
66

7-
| | Linux/macOS | Windows |
8-
|:-:|:-:|:-:|
9-
| **Build Status** | [![Build status](https://img.shields.io/travis/aspnet-contrib/AspNet.Security.OAuth.Providers/dev.svg)](https://travis-ci.org/aspnet-contrib/AspNet.Security.OAuth.Providers) | [![Build status](https://img.shields.io/appveyor/ci/aspnet-contrib/aspnet-security-oauth-providers/dev.svg)](https://ci.appveyor.com/project/aspnet-contrib/aspnet-security-oauth-providers) |
10-
| **Build History** | [![Build history](https://buildstats.info/travisci/chart/aspnet-contrib/AspNet.Security.OAuth.Providers?branch=dev&includeBuildsFromPullRequest=false)](https://travis-ci.org/aspnet-contrib/AspNet.Security.OAuth.Providers) | [![Build history](https://buildstats.info/appveyor/chart/aspnet-contrib/aspnet-security-oauth-providers?branch=dev&includeBuildsFromPullRequest=false)](https://ci.appveyor.com/project/aspnet-contrib/aspnet-security-oauth-providers) |
7+
[![Build status](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/workflows/build/badge.svg?branch=dev&event=push)](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/actions?query=workflow%3Abuild+branch%3Adev+event%3Apush)
118

129
## Getting started
1310

appveyor.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)