Skip to content

Commit 28d203c

Browse files
committed
feat: release of the first alpha version of the react-x library
1 parent d0163bb commit 28d203c

35 files changed

Lines changed: 8904 additions & 0 deletions

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

.github/workflows/ci.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Build and publish package
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
- next
11+
12+
env:
13+
NODE_VERSION: 22
14+
PNPM_VERSION: 10
15+
16+
jobs:
17+
commitlint:
18+
name: Commit Lint
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: wagoid/commitlint-github-action@v6
23+
with:
24+
configFile: .commitlintrc.json
25+
lint:
26+
name: Lint
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out repository
30+
uses: actions/checkout@v6
31+
32+
- name: Install pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
version: ${{ env.PNPM_VERSION }}
36+
37+
- name: Setup node
38+
uses: actions/setup-node@v5
39+
with:
40+
node-version-file: '.nvmrc'
41+
cache: 'pnpm'
42+
43+
- name: Install dependencies
44+
run: pnpm install
45+
46+
- name: Run lint with ESLint
47+
run: pnpm run lint
48+
49+
- name: Run lint with TypeScript
50+
run: pnpm run lint:types
51+
52+
test:
53+
name: Test (React ${{ matrix.react-version }})
54+
needs: [ commitlint, lint ]
55+
runs-on: ubuntu-latest
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
react-version: [ 18, 19 ]
60+
steps:
61+
- name: Check out repository
62+
uses: actions/checkout@v6
63+
64+
- name: Install pnpm
65+
uses: pnpm/action-setup@v4
66+
with:
67+
version: ${{ env.PNPM_VERSION }}
68+
69+
- name: Setup node
70+
uses: actions/setup-node@v5
71+
with:
72+
node-version-file: '.nvmrc'
73+
cache: 'pnpm'
74+
75+
- name: Install dependencies
76+
run: pnpm install
77+
78+
- name: Install React ${{ matrix.react-version }}
79+
run: pnpm add -D react@^${{ matrix.react-version }} react-dom@^${{ matrix.react-version }}
80+
81+
- name: Run tests
82+
run: pnpm run test
83+
84+
publish:
85+
name: Build and publish
86+
if: |
87+
github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next')
88+
needs: [ commitlint, lint, test ]
89+
runs-on: ubuntu-latest
90+
permissions:
91+
contents: write
92+
id-token: write
93+
issues: write
94+
pull-requests: write
95+
steps:
96+
- name: Check out repository
97+
uses: actions/checkout@v6
98+
99+
- name: Install pnpm
100+
uses: pnpm/action-setup@v4
101+
with:
102+
version: ${{ env.PNPM_VERSION }}
103+
104+
- name: Setup node
105+
uses: actions/setup-node@v5
106+
with:
107+
node-version-file: '.nvmrc'
108+
cache: 'pnpm'
109+
110+
- name: Install dependencies
111+
run: pnpm install
112+
113+
- name: Run build
114+
run: pnpm build
115+
116+
- name: Release
117+
run: pnpm release
118+
env:
119+
GH_TOKEN: ${{ secrets.WEBEACH_GITHUB_RELEASE_TOKEN }}
120+
NPM_TOKEN: ${{ secrets.WEBEACH_NPM_PUBLISH_TOKEN }}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
commitlint --edit

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lint-staged
2+
pnpm run lint:types

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm run test

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.21.1

.releaserc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"branches": [
3+
"main",
4+
{
5+
"name": "next",
6+
"prerelease": "rc"
7+
}
8+
],
9+
"plugins": [
10+
["@semantic-release/commit-analyzer", {
11+
"preset": "conventionalcommits",
12+
"presetConfig": {
13+
"preMajor": true
14+
}
15+
}],
16+
"@semantic-release/release-notes-generator",
17+
"@semantic-release/changelog",
18+
"@semantic-release/npm",
19+
"@semantic-release/git",
20+
"@semantic-release/github"
21+
]
22+
}

0 commit comments

Comments
 (0)