Skip to content

Commit 376f976

Browse files
committed
chore: add publish workflow
1 parent 6324fd8 commit 376f976

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '18'
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Publish to NPM
27+
run: npm publish
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,28 @@ After installing the package, you can import the SCSS stylesheet in your project
2121
```
2222

2323
Make sure to include the necessary build tools to compile SCSS into CSS.
24+
25+
## Publishing
26+
27+
This package is automatically published to NPM when a new version tag is pushed to GitHub.
28+
29+
### Release Process
30+
31+
1. Update the version in `package.json`:
32+
```sh
33+
npm version patch # or minor/major
34+
```
35+
36+
2. Push the tag to GitHub:
37+
```sh
38+
git push origin --tags
39+
```
40+
41+
3. The GitHub Action will automatically:
42+
- Build the package
43+
- Publish to NPM under `@angular-buch/styles`
44+
45+
### Prerequisites
46+
47+
- NPM_TOKEN secret must be configured in GitHub repository settings
48+
- Token must have publish permissions for the `@angular-buch` organization

0 commit comments

Comments
 (0)