-
Notifications
You must be signed in to change notification settings - Fork 49
197 lines (165 loc) · 5.43 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: Create NuGet and GitHub Release
on:
pull_request:
types:
- closed
workflow_dispatch:
push:
branches: ["feat/automated-release"]
permissions:
contents: write
### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows` and append `@latest` after the common `dx-sdk-actions` repo is made public.
### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
jobs:
build:
name: Build
runs-on: windows-latest
environment: 'release'
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Install .NET
uses: actions/setup-dotnet@v3
- name: Install .NET Android and iOS workload
run: dotnet workload install android ios
- name: Setup NuGet
uses: nuget/setup-nuget@v1
- name: Restore NuGet
run: nuget restore Auth0.OidcClient.All.sln
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Build
run: msbuild Auth0.OidcClient.All.sln -t:rebuild -verbosity:diag -property:Configuration=Release
- uses: actions/upload-artifact@v4
with:
name: build
path: './src'
retention-days: 1
compression-level: 9
android:
name: Android
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'android-'
project-path: "src/Auth0.OidcClient.Android"
nuspec-file: "nuget/Auth0.OidcClient.Android.nuspec"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
androidx:
name: AndroidX
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'androidx-'
project-path: "src/Auth0.OidcClient.AndroidX"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
ios:
name: iOS
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'ios-'
project-path: "src/Auth0.OidcClient.iOS"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
core:
name: Core
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'core-'
project-path: "src/Auth0.OidcClient.Core"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
wpf:
name: WPF
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'wpf-'
project-path: "src/Auth0.OidcClient.WPF"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
winforms:
name: WinForms
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'winforms-'
project-path: "src/Auth0.OidcClient.WinForms"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
uwp:
name: UWP
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'uwp-'
project-path: "src/Auth0.OidcClient.UWP"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
maui:
name: MAUI
uses: ./.github/workflows/nuget-release.yml
needs: build
with:
tag-prefix: 'maui-'
project-path: "src/Auth0.OidcClient.MAUI"
secrets:
nuget-token: ${{ secrets.NUGET_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
generate-docs:
name: Generate API docs
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
runs-on: windows-latest
environment: release
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
path: './src'
name: build
- name: Install DocFX
run: dotnet tool install -g docfx
- name: Build docs
run: ./tools/build-docs.sh
shell: bash
- uses: actions/upload-pages-artifact@v2
with:
path: docs
deploy-docs:
needs: generate-docs
name: Deploy API docs
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3 # or specific "vX.X.X" version tag for this action