Skip to content

Commit 35994cb

Browse files
authored
Merge pull request #49 from cerebrl/SDKS-2111/improve-local-and-ci
Sdks 2111/improve local and ci
2 parents 57ac185 + fde147f commit 35994cb

17 files changed

+5774
-175
lines changed

.github/workflows/preview.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
branches:
55
- main
6+
- next
7+
- beta
8+
- alpha
69
jobs:
710
preview:
811
runs-on: ubuntu-latest

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- next
7+
- beta
8+
- alpha
9+
- '*.x'
10+
permissions:
11+
contents: write
12+
issues: write
13+
pull-requests: write
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node: ['16.x']
20+
os: ['ubuntu-latest']
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
with:
25+
persist-credentials: false
26+
fetch-depth: 0
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node }}
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: Build
34+
run: npm run build
35+
env:
36+
NODE_ENV: production
37+
- name: Release
38+
run: npx semantic-release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/pre-push

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
CI=true npm run ci
5+
npm run test:e2e

.husky/prepare-commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
exec < /dev/tty && npx cz --hook || true

.prettierrc

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@
22
"useTabs": false,
33
"singleQuote": true,
44
"trailingComma": "all",
5-
"printWidth": 100
5+
"printWidth": 100,
6+
"overrides": [
7+
{
8+
"files": "*.json",
9+
"options": {
10+
"tabWidth": 2,
11+
"parser": "json"
12+
}
13+
}
14+
]
615
}

.releaserc.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"branches": [
3+
{
4+
"name": "main"
5+
},
6+
"+([0-9])?(.{+([0-9]),x}).x",
7+
{
8+
"name": "beta",
9+
"channel": "beta",
10+
"prerelease": true
11+
},
12+
{
13+
"name": "alpha",
14+
"channel": "alpha",
15+
"prerelease": true
16+
},
17+
{
18+
"name": "next",
19+
"channel": "next"
20+
}
21+
],
22+
"ci": true,
23+
"repositoryUrl": "https://github.com/cerebrl/forgerock-web-login-framework.git",
24+
"plugins": [
25+
"@semantic-release/commit-analyzer",
26+
"@semantic-release/release-notes-generator",
27+
"@semantic-release/changelog",
28+
[
29+
"@semantic-release/exec",
30+
{
31+
"prepare": "node ./tools/edit-package.cjs ${nextRelease.version}"
32+
}
33+
],
34+
[
35+
"@semantic-release/npm",
36+
{
37+
"pkgRoot": "./package"
38+
}
39+
],
40+
[
41+
"@semantic-release/github",
42+
{
43+
"assets": ["package/*.md", "package/*.json"]
44+
}
45+
],
46+
[
47+
"@semantic-release/git",
48+
{
49+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
50+
"assets": ["package.json", "widget.css", "README.md"]
51+
}
52+
]
53+
]
54+
}

.stignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
node_modules

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ForgeRock Web Login Framework
22

3+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
4+
[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
5+
36
## WARNING: VAPORWARE
47

58
**This is a prototype of a development framework for generating a ForgeRock Login App for self-hosting or JavaScript Widget into an existing self-hosted SPA (React, Vue, Angular, etc.). This project is not officially supported and is not recommended for any project development. If you use this, you accept all the risks that come with completely unsupported software.**

0 commit comments

Comments
 (0)