@@ -126,50 +126,100 @@ jobs:
126
126
with :
127
127
version : ${{ env.PNPM_VERSION }}
128
128
run_install : false
129
+
130
+ # oidc-client-service-worker
131
+ - name : pnpm version ${{ steps.tag.outputs.new_version }}
132
+ if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
133
+ run : pnpm version ${{ steps.tag.outputs.new_version }}
134
+ working-directory : ./packages/oidc-client-service-worker
135
+
136
+ - name : pnpm ci
137
+ run : pnpm i --frozen-lockfile
138
+ working-directory : ./packages/oidc-client-service-worker
139
+
140
+ - name : pnpm prepare
141
+ run : pnpm run prepare
142
+ working-directory : ./packages/oidc-client-service-worker
143
+
144
+ - name : pnpm test
145
+ run : pnpm test -- --run
146
+ working-directory : ./packages/oidc-client-service-worker
147
+
148
+ # oidc-client
149
+ - name : pnpm version ${{ steps.tag.outputs.new_version }}
150
+ if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
151
+ run : pnpm version ${{ steps.tag.outputs.new_version }}
152
+ working-directory : ./packages/oidc-client
153
+
154
+ - name : pnpm ci
155
+ run : pnpm i --frozen-lockfile
156
+ working-directory : ./packages/oidc-client
129
157
158
+ - name : pnpm prepare
159
+ run : pnpm run prepare
160
+ working-directory : ./packages/oidc-client
161
+
162
+ # React-oidc
130
163
- name : npm version ${{ steps.tag.outputs.new_version }}
131
164
if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
132
165
run : npm version ${{ steps.tag.outputs.new_version }}
133
166
working-directory : ./packages/react-oidc
134
-
167
+
135
168
- name : pnpm i
136
169
run : pnpm i --frozen-lockfile
137
170
working-directory : ./packages/react-oidc
138
171
139
172
- name : pnpm prepare
140
173
run : pnpm run prepare
141
174
working-directory : ./packages/react-oidc
142
-
175
+
143
176
- name : pnpm test
144
177
run : pnpm test -- --run
145
178
working-directory : ./packages/react-oidc
146
179
147
- - id : publish-react
180
+ - name : Commit updates package.json
181
+ uses : stefanzweifel/git-auto-commit-action@v4
182
+ if : github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release'
183
+ with :
184
+ commit_message : " [skip ci] Update version package.json"
185
+ commit_user_name : GitHub
186
+ commit_user_email : github-action@bot.com
187
+ commit_author : GitHub <github-action@bot.com>
188
+ push_options : ' --force'
189
+
190
+ # oidc-client-service-worker
191
+ - id : publish-oidc-client-service-worker
148
192
uses : JS-DevTools/npm-publish@v1
149
193
if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
150
194
with :
151
195
token : ${{ secrets.NPM_TOKEN }}
152
- package : ./packages/react-oidc/package.json
153
-
154
- - name : pnpm version ${{ steps.tag.outputs.new_version }}
155
- if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
156
- run : pnpm version ${{ steps.tag.outputs.new_version }}
157
- working-directory : ./packages/oidc-client
196
+ package : ./packages/oidc-client-service-worker/package.json
158
197
159
- - name : pnpm ci
160
- run : pnpm i --frozen-lockfile
161
- working-directory : ./packages/oidc-client
162
-
163
- - name : pnpm prepare
164
- run : pnpm run prepare
198
+ # oidc-client
199
+ - name : replace workspace:* by ${{ steps.tag.outputs.new_version }}
200
+ if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
201
+ run : sed -i 's/workspace:\*/${{ steps.tag.outputs.new_version }}/g' package.json
165
202
working-directory : ./packages/oidc-client
166
-
203
+
167
204
- id : publish-oidc-client
168
205
uses : JS-DevTools/npm-publish@v1
169
206
if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
170
207
with :
171
208
token : ${{ secrets.NPM_TOKEN }}
172
209
package : ./packages/oidc-client/package.json
210
+
211
+ # react-oidc
212
+ - name : replace workspace:* by ${{ steps.tag.outputs.new_version }}
213
+ if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
214
+ run : sed -i 's/workspace:\*/${{ steps.tag.outputs.new_version }}/g' package.json
215
+ working-directory : ./packages/react-oidc
216
+
217
+ - id : publish-react
218
+ uses : JS-DevTools/npm-publish@v1
219
+ if : (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
220
+ with :
221
+ token : ${{ secrets.NPM_TOKEN }}
222
+ package : ./packages/react-oidc/package.json
173
223
174
224
- name : SonarCloud Scan
175
225
uses : sonarsource/sonarcloud-github-action@master
@@ -183,20 +233,10 @@ jobs:
183
233
-Dsonar.projectKey=AxaGuilDEv_react-oidc
184
234
-Dsonar.exclusions=**/*.spec.js,**/*.stories.js,Scripts/**,**/*.scss,**/__snapshots__/**,**/*[Tt]ests.cs,**/node_modules/**,**/ClientApp/build/**,**/ClientApp/.storybook/**,**/ClientApp/storybook-static/**,**/obj/**,**/__mocks__/**,**/ClientApp/src/serviceWorker.ts
185
235
-Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info
186
-
187
- - name : Commit updates package.json
188
- uses : stefanzweifel/git-auto-commit-action@v4
189
- if : github.ref == 'refs/heads/main'
190
- with :
191
- commit_message : " [skip ci] Update version package.json"
192
- commit_user_name : GitHub
193
- commit_user_email : github-action@bot.com
194
- commit_author : GitHub <github-action@bot.com>
195
- push_options : ' --force'
196
236
197
237
- name : Create a GitHub release
198
238
uses : ncipollo/release-action@v1
199
- if : github.ref == 'refs/heads/main'
239
+ if : github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release'
200
240
with :
201
241
tag : ${{ steps.tag_version.outputs.new_tag }}
202
242
name : Release ${{ steps.tag_version.outputs.new_tag }}
0 commit comments