Skip to content

Commit ccf6d5e

Browse files
authored
GitHub CICD (#22)
* feat(ci): add format check pipeline * feat(ci): run format locally * chore(ci): add publish and format workflows * chore(ci): test workflow is working * fix(ci): run format script
1 parent 8b1c3ce commit ccf6d5e

File tree

6 files changed

+3290
-10
lines changed

6 files changed

+3290
-10
lines changed

.github/workflows/format-lint.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: format-lint.yaml
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
format:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '20'
16+
- run: npm ci
17+
- name: Prettier check
18+
run: npm run format:check
19+
- name: Lint the code
20+
run: npm run lint

.github/workflows/publish.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
- run: npm ci
20+
- run: npm publish --provenance --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.idea
22
lib
33
node_modules
4-
package-lock.json

0 commit comments

Comments
 (0)