Skip to content

Commit e04fb4b

Browse files
chore(ci): invert client and react (alpha)
1 parent 4be9aed commit e04fb4b

File tree

8 files changed

+117
-39
lines changed

8 files changed

+117
-39
lines changed

.github/workflows/azure-static-web-apps-black-rock-0dc6b0d03.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
branches:
1010
- main
1111

12+
env:
13+
PNPM_VERSION: 8.5.1
14+
NODE_VERSION: 18
1215
jobs:
1316
skip_ci:
1417
runs-on: ubuntu-latest
@@ -27,7 +30,12 @@ jobs:
2730
submodules: true
2831
- uses: actions/setup-node@v2
2932
with:
30-
node-version: 18
33+
node-version: ${{ env.NODE_VERSION }}
34+
- uses: pnpm/action-setup@v2
35+
name: Install pnpm
36+
with:
37+
version: ${{ env.PNPM_VERSION }}
38+
run_install: false
3139
- name: pnpm install
3240
run: pnpm i --frozen-lockfile
3341
working-directory: ./packages/react-oidc

.github/workflows/azure-static-web-apps-icy-glacier-004ab4303.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
branches:
1010
- main
1111

12+
env:
13+
PNPM_VERSION: 8.5.1
14+
NODE_VERSION: 18
1215
jobs:
1316
skip_ci:
1417
runs-on: ubuntu-latest
@@ -27,7 +30,12 @@ jobs:
2730
submodules: true
2831
- uses: actions/setup-node@v2
2932
with:
30-
node-version: 18
33+
node-version: ${{ env.NODE_VERSION }}
34+
- uses: pnpm/action-setup@v2
35+
name: Install pnpm
36+
with:
37+
version: ${{ env.PNPM_VERSION }}
38+
run_install: false
3139
- name: pnpm install
3240
run: pnpm i --frozen-lockfile
3341
working-directory: ./examples/react-oidc-demo

.github/workflows/npm-publish.yml

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -126,50 +126,100 @@ jobs:
126126
with:
127127
version: ${{ env.PNPM_VERSION }}
128128
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
129157

158+
- name: pnpm prepare
159+
run: pnpm run prepare
160+
working-directory: ./packages/oidc-client
161+
162+
# React-oidc
130163
- name: npm version ${{ steps.tag.outputs.new_version }}
131164
if: (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
132165
run: npm version ${{ steps.tag.outputs.new_version }}
133166
working-directory: ./packages/react-oidc
134-
167+
135168
- name: pnpm i
136169
run: pnpm i --frozen-lockfile
137170
working-directory: ./packages/react-oidc
138171

139172
- name: pnpm prepare
140173
run: pnpm run prepare
141174
working-directory: ./packages/react-oidc
142-
175+
143176
- name: pnpm test
144177
run: pnpm test -- --run
145178
working-directory: ./packages/react-oidc
146179

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
148192
uses: JS-DevTools/npm-publish@v1
149193
if: (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
150194
with:
151195
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
158197

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
165202
working-directory: ./packages/oidc-client
166-
203+
167204
- id: publish-oidc-client
168205
uses: JS-DevTools/npm-publish@v1
169206
if: (github.ref == 'refs/heads/main' && steps.which_tag.outputs.tag == 'release') || steps.which_tag.outputs.tag == 'alpha' || steps.which_tag.outputs.tag == 'beta'
170207
with:
171208
token: ${{ secrets.NPM_TOKEN }}
172209
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
173223

174224
- name: SonarCloud Scan
175225
uses: sonarsource/sonarcloud-github-action@master
@@ -183,20 +233,10 @@ jobs:
183233
-Dsonar.projectKey=AxaGuilDEv_react-oidc
184234
-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
185235
-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'
196236
197237
- name: Create a GitHub release
198238
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'
200240
with:
201241
tag: ${{ steps.tag_version.outputs.new_tag }}
202242
name: Release ${{ steps.tag_version.outputs.new_tag }}

packages/oidc-client-service-worker/package.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@axa-fr/oidc-client-service-worker",
3-
"version": "6.16.1",
4-
"private": true,
3+
"version": "6.24.1",
54
"type": "module",
5+
"private": false,
66
"main": "dist/OidcServiceWorker.js",
77
"types": "dist/OidcServiceWorker.d.ts",
88
"description": "OpenID Connect & OAuth authentication service worker",
@@ -19,6 +19,10 @@
1919
"oauth2",
2020
"oauth"
2121
],
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/AxaGuilDEv/react-oidc.git"
25+
},
2226
"scripts": {
2327
"copy": "cpy --flat ./src/OidcTrustedDomains.js ./dist/",
2428
"build": "tsc && vite build && pnpm run copy",
@@ -41,13 +45,17 @@
4145
"eslint-import-resolver-typescript": "^3.5.5",
4246
"eslint-plugin-react": "^7.32.2",
4347
"eslint-plugin-simple-import-sort": "^10.0.0",
44-
"rimraf": "5.0.1",
48+
"rimraf": "5.0.1",
4549
"msw": "1.2.2",
4650
"typescript": "5.1.6",
4751
"vite": "^4.4.4",
4852
"vite-plugin-dts": "^3.3.0",
4953
"vitest": "^0.33.0"
5054
},
55+
"publishConfig": {
56+
"access": "public",
57+
"registry": "https://registry.npmjs.org/"
58+
},
5159
"license": "MIT",
5260
"browserslist": {
5361
"production": [
@@ -61,4 +69,4 @@
6169
"last 1 safari version"
6270
]
6371
}
64-
}
72+
}

packages/oidc-client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/oidc-client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
"type": "git",
2020
"url": "https://github.com/AxaGuilDEv/react-oidc.git"
2121
},
22+
"dependencies": {
23+
"@axa-fr/oidc-client-service-worker": "workspace:*"
24+
},
2225
"devDependencies": {
23-
"@axa-fr/oidc-client-service-worker": "workspace:*",
2426
"@testing-library/dom": "^9.3.1",
2527
"@testing-library/jest-dom": "^5.16.5",
2628
"@testing-library/react": "13.3.0",

packages/react-oidc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
},
4242
"dependencies": {
4343
"@axa-fr/oidc-client-service-worker": "workspace:*",
44-
"@axa-fr/vanilla-oidc": "workspace:*"
44+
"@axa-fr/vanilla-oidc": "workspace:*",
45+
"base64-js": "1.5.1"
4546
},
4647
"peerDependencies": {
4748
"react": "^17.0.0 || ^18.0.0",

pnpm-lock.yaml

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)