Skip to content

Commit 048c9da

Browse files
authored
chore: prepare for release (#1)
1 parent 6277f84 commit 048c9da

7 files changed

Lines changed: 10929 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
ci:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Setup Node.js
29+
id: setup-node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: ".nvmrc"
33+
registry-url: "https://registry.npmjs.org/"
34+
cache: npm
35+
scope: "@auth0"
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Validate Commits Messages
41+
if: github.event_name == 'pull_request'
42+
run: npx --no-install commitlint --verbose --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }}
43+
44+
- name: Lint
45+
run: npm run lint
46+
47+
- name: Build
48+
run: npm run build
49+
50+
- name: Test
51+
run: npm test

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
19+
id-token: write
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: .nvmrc
29+
- name: Install dependencies
30+
run: npm clean-install
31+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
32+
run: npm audit signatures
33+
- name: Build
34+
run: npm run build
35+
- name: Release
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
run: npx --no-install semantic-release

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,3 @@ dist
144144
# End of https://www.toptal.com/developers/gitignore/api/node
145145
n
146146

147-
package-lock.json

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --verbose --edit "$1"

commitlint.config.cjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
extends: ["@commitlint/config-conventional"],
3+
rules: {
4+
// TODO Add Scope Enum Here
5+
// 'scope-enum': [2, 'always', ['yourscope', 'yourscope']],
6+
"type-enum": [
7+
2,
8+
"always",
9+
[
10+
"feat",
11+
"fix",
12+
"docs",
13+
"chore",
14+
"style",
15+
"refactor",
16+
"ci",
17+
"test",
18+
"revert",
19+
"perf",
20+
"vercel",
21+
],
22+
],
23+
},
24+
};

0 commit comments

Comments
 (0)