Skip to content

Commit b1f30c3

Browse files
feat: Add Github workflow
1 parent 8758281 commit b1f30c3

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- '**'
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
run:
15+
name: Lint & test
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Check out Git repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20.x'
26+
registry-url: 'https://registry.npmjs.org'
27+
28+
- name: Install Dependencies
29+
run: npm i
30+
31+
- name: Code Linting
32+
run: npm run lint
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Package to npmjs
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm i
19+
- run: npm publish --provenance --access public
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)