You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,59 @@ export type { ButtonProps } from './components/Button';
144
144
|`npm run format`| Format code with Prettier |
145
145
|`npm run format:check`| Check formatting without writing |
146
146
147
+
## CI/CD
148
+
149
+
This project uses GitHub Actions for continuous integration and publishing.
150
+
151
+
### CI (`.github/workflows/ci.yml`)
152
+
153
+
Runs automatically on every **push to `main`** and on **pull requests** targeting `main`. It runs lint, tests, and build to catch issues early.
154
+
155
+
### Publishing (`.github/workflows/publish.yml`)
156
+
157
+
Runs when you push a **version tag** (e.g. `v0.2.0`). The version in `package.json` is set automatically from the tag name — no need to update it manually. The package is published to **GitHub Packages**.
158
+
159
+
To publish a new version:
160
+
161
+
```bash
162
+
git tag v0.2.0
163
+
git push origin v0.2.0
164
+
```
165
+
166
+
## Installing in a Consuming Project
167
+
168
+
Since this package is hosted on GitHub Packages, the consuming project needs a one-time setup.
169
+
170
+
### 1. Create a GitHub Personal Access Token
171
+
172
+
Go to [GitHub → Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens) and create a **classic** token with the **`read:packages`** scope.
173
+
174
+
### 2. Add a `.npmrc` to the consuming project root
175
+
176
+
```ini
177
+
@pigna:registry=https://npm.pkg.github.com
178
+
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
179
+
```
180
+
181
+
> **Do not commit a real token.** The `.npmrc` references an environment variable (`NPM_TOKEN`).
182
+
183
+
### 3. Set the token
184
+
185
+
-**Locally:** export the token in your shell before running `npm install`:
Alternatively, add the token to your **user-level**`~/.npmrc` so it applies globally without polluting the project.
191
+
192
+
-**In CI:** add `NPM_TOKEN` as a **repository secret** in the consuming project's GitHub settings. Then pass it as an environment variable in your workflow.
193
+
194
+
### 4. Install the package
195
+
196
+
```bash
197
+
npm install @pigna/component-library
198
+
```
199
+
147
200
## Other tools
148
201
-```npx skills add pbakaus/impeccable``` - Styling tool by **pbakaus/impeccable**https://impeccable.style/
0 commit comments