@@ -13,9 +13,35 @@ permissions:
1313 id-token : write
1414
1515jobs :
16- pack :
16+ rl-scanner-aspnetcore-api :
17+ uses : ./.github/workflows/rl-secure.yml
18+ with :
19+ project-path : " src/Auth0.AspNetCore.Authentication.Api/Auth0.AspNetCore.Authentication.Api.csproj"
20+ artifact-name : " Auth0.AspNetCore.Authentication.Api.tgz"
21+ secrets :
22+ RLSECURE_LICENSE : ${{ secrets.RLSECURE_LICENSE }}
23+ RLSECURE_SITE_KEY : ${{ secrets.RLSECURE_SITE_KEY }}
24+ SIGNAL_HANDLER_TOKEN : ${{ secrets.SIGNAL_HANDLER_TOKEN }}
25+ PRODSEC_TOOLS_USER : ${{ secrets.PRODSEC_TOOLS_USER }}
26+ PRODSEC_TOOLS_TOKEN : ${{ secrets.PRODSEC_TOOLS_TOKEN }}
27+ PRODSEC_TOOLS_ARN : ${{ secrets.PRODSEC_TOOLS_ARN }}
28+
29+ release :
30+ needs : [rl-scanner-aspnetcore-api]
31+ uses : ./.github/workflows/nuget-release.yml
32+ with :
33+ dotnet-version : 8.0.x
34+ project-paths : " ['src/Auth0.AspNetCore.Authentication.Api/Auth0.AspNetCore.Authentication.Api.csproj']"
35+ secrets :
36+ nuget-token : ${{ secrets.NUGET_APIKEY }}
37+ github-token : ${{ secrets.GITHUB_TOKEN }}
38+
39+ generate-docs :
40+ name : Generate API docs
41+ needs : [release]
1742 if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
1843 runs-on : ubuntu-latest
44+
1945 steps :
2046 - name : Checkout code
2147 uses : actions/checkout@v5
@@ -26,44 +52,33 @@ jobs:
2652 uses : actions/setup-dotnet@v5
2753 with :
2854 dotnet-version : 8.0.x
29-
30- - name : Get version
31- id : get_version
32- uses : ./.github/actions/get-version
33-
34- - name : Create NuGet package
35- run : |
36- dotnet pack src/Auth0.AspNetCore.Authentication.Api/Auth0.AspNetCore.Authentication.Api.csproj \
37- --configuration Release \
38- --output ${{ github.workspace }}/nuget \
39- /p:Version=${{ steps.get_version.outputs.version }}
40-
41- - name : Upload NuGet package as artifact
42- uses : actions/upload-artifact@v4
55+
56+ - name : Install DocFX
57+ run : dotnet tool install -g docfx
58+
59+ - name : Build docs
60+ run : docfx docs-source/docfx.json
61+
62+ - name : Uploading Artifacts
63+ uses : actions/upload-pages-artifact@v4
4364 with :
44- name : nuget-package
45- path : ${{ github.workspace }}/nuget/*.nupkg
46- retention-days : 1
65+ path : docs
4766
48- rl-scanner :
49- needs : pack
50- uses : ./.github/workflows/rl-secure.yml
51- with :
52- artifact-name : " aspnetcore-api.tgz"
53- secrets :
54- RLSECURE_LICENSE : ${{ secrets.RLSECURE_LICENSE }}
55- RLSECURE_SITE_KEY : ${{ secrets.RLSECURE_SITE_KEY }}
56- SIGNAL_HANDLER_TOKEN : ${{ secrets.SIGNAL_HANDLER_TOKEN }}
57- PRODSEC_TOOLS_USER : ${{ secrets.PRODSEC_TOOLS_USER }}
58- PRODSEC_TOOLS_TOKEN : ${{ secrets.PRODSEC_TOOLS_TOKEN }}
59- PRODSEC_TOOLS_ARN : ${{ secrets.PRODSEC_TOOLS_ARN }}
67+ deploy-docs :
68+ needs : generate-docs
69+ name : Deploy API docs
70+ if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
6071
72+ permissions :
73+ pages : write # to deploy to Pages
74+ id-token : write # to verify the deployment originates from an appropriate source
6175
62- release :
63- needs : rl-scanner
64- uses : ./.github/workflows/nuget-release.yml
65- with :
66- nuget-directory : nuget
67- secrets :
68- nuget-token : ${{ secrets.NUGET_APIKEY }}
69- github-token : ${{ secrets.GITHUB_TOKEN }}
76+ environment :
77+ name : github-pages
78+ url : ${{ steps.deployment.outputs.page_url }}
79+
80+ runs-on : ubuntu-latest
81+ steps :
82+ - name : Deploy to GitHub Pages
83+ id : deployment
84+ uses : actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
0 commit comments