-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-show_as_button
- Loading branch information
Showing
17 changed files
with
592 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
AUTH0_AUTHENTICATION_API_URL: '${{ vars.AUTH0_AUTHENTICATION_API_URL }}' | ||
AUTH0_CLIENT_ID: '${{ vars.AUTH0_CLIENT_ID }}' | ||
AUTH0_CLIENT_SECRET: '${{ secrets.AUTH0_CLIENT_SECRET }}' | ||
AUTH0_HS256_CLIENT_ID: '${{ vars.AUTH0_HS256_CLIENT_ID }}' | ||
AUTH0_HS256_CLIENT_SECRET: '${{ secrets.AUTH0_HS256_CLIENT_SECRET }}' | ||
AUTH0_MANAGEMENT_API_AUDIENCE: '${{ vars.AUTH0_MANAGEMENT_API_AUDIENCE }}' | ||
AUTH0_MANAGEMENT_API_CLIENT_ID: '${{ vars.AUTH0_MANAGEMENT_API_CLIENT_ID }}' | ||
AUTH0_MANAGEMENT_API_CLIENT_SECRET: '${{ secrets.AUTH0_MANAGEMENT_API_CLIENT_SECRET }}' | ||
AUTH0_MANAGEMENT_API_URL: '${{ vars.AUTH0_MANAGEMENT_API_URL }}' | ||
AUTH0_PASSWORDLESSDEMO_AUTHENTICATION_API_URL: '${{ vars.AUTH0_PASSWORDLESSDEMO_AUTHENTICATION_API_URL }}' | ||
AUTH0_PASSWORDLESSDEMO_CLIENT_ID: '${{ vars.AUTH0_PASSWORDLESSDEMO_CLIENT_ID }}' | ||
BRUCKE_AUTHENTICATION_API_URL: '${{ vars.BRUCKE_AUTHENTICATION_API_URL }}' | ||
BRUCKE_MANAGEMENT_API_AUDIENCE: '${{ vars.BRUCKE_MANAGEMENT_API_AUDIENCE }}' | ||
BRUCKE_MANAGEMENT_API_CLIENT_ID: '${{ vars.BRUCKE_MANAGEMENT_API_CLIENT_ID }}' | ||
BRUCKE_MANAGEMENT_API_CLIENT_SECRET: '${{ secrets.BRUCKE_MANAGEMENT_API_CLIENT_SECRET }}' | ||
BRUCKE_MANAGEMENT_API_URL: '${{ vars.BRUCKE_MANAGEMENT_API_URL }}' | ||
BuildConfiguration: '${{ vars.BuildConfiguration }}' | ||
CACHE_KEY: '${{ github.ref }}-${{ github.run_id }}-${{ github.run_attempt }}' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore | ||
- name: Save build artifacts | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: . | ||
key: ${{ env.CACHE_KEY }} | ||
test_core: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Test Auth0.Core | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore build artifacts | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: . | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Test Core | ||
run: dotnet test tests/Auth0.Core.UnitTests/Auth0.Core.UnitTests.csproj | ||
test_auth: | ||
needs: test_core | ||
runs-on: ubuntu-latest | ||
name: Test Auth0.AuthenticationApi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore build artifacts | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: . | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Test Authentication API | ||
run: dotnet test tests/Auth0.AuthenticationApi.IntegrationTests/Auth0.AuthenticationApi.IntegrationTests.csproj | ||
test_management: | ||
needs: test_auth | ||
runs-on: ubuntu-latest | ||
name: Test Auth0.ManagementApi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore build artifacts | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: . | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Test Management API | ||
run: dotnet test tests/Auth0.ManagementApi.IntegrationTests/Auth0.ManagementApi.IntegrationTests.csproj |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
NuGetDirectory: ${{ github.workspace}}/nuget | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
create_nuget: | ||
name: 'Create NuGet' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- run: dotnet pack src/Auth0.Core/Auth0.Core.csproj --configuration Release --output ${{ env.NuGetDirectory }} | ||
- run: dotnet pack src/Auth0.AuthenticationApi/Auth0.AuthenticationApi.csproj --configuration Release --output ${{ env.NuGetDirectory }} | ||
- run: dotnet pack src/Auth0.ManagementApi/Auth0.ManagementApi.csproj --configuration Release --output ${{ env.NuGetDirectory }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: nuget | ||
if-no-files-found: error | ||
retention-days: 7 | ||
path: ${{ env.NuGetDirectory }}/*.nupkg | ||
|
||
publish_nuget: | ||
name: 'Publish NuGet' | ||
environment: release | ||
runs-on: ubuntu-latest | ||
needs: [ create_nuget ] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: nuget | ||
path: ${{ env.NuGetDirectory }} | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Publish NuGet package | ||
run: | | ||
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { | ||
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.