Skip to content

Commit dbdde3a

Browse files
committed
CI/CD Pipeline
Add github workflow and npmignore
1 parent 2c1f7fd commit dbdde3a

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*.*.*'
9+
10+
jobs:
11+
build-test-deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 'lts/*'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Run tests
28+
run: npm run test
29+
30+
- name: Build the project
31+
run: npm run build
32+
33+
- name: Publish to npm
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
run: npm publish --access public

.npmignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__tests__/
2+
.devcontainer/
3+
.github/
4+
node_modules/
5+
src/
6+
types/
7+
.gitignore
8+
jest.config.ts
9+
jest.setup.ts
10+
tsconfig.json

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"registry": "https://www.npmjs.com/package/simple-shader-component"
1111
},
1212
"repository": "https://github.com/svey-xyz/simple-shader-component",
13+
"files": [
14+
"dist/",
15+
"README.md",
16+
"LICENSE"
17+
],
1318
"devDependencies": {
1419
"@testing-library/jest-dom": "^6.6.3",
1520
"@testing-library/react": "^16.0.1",

0 commit comments

Comments
 (0)