Skip to content

Commit 83ad72f

Browse files
authored
add release-it and config (#83)
1 parent 1e00d19 commit 83ad72f

5 files changed

Lines changed: 7450 additions & 749 deletions

File tree

.github/workflows/pr-ci-github.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Node.js Package
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish-npm:
8+
if: github.ref == 'refs/heads/main'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: "20.x"
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/publish-github.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
# scope: '@octocat'
1919
- run: npm ci
2020
- run: npm run build
21-
# - run: npm run coverage
22-
- run: npm run test
21+
- run: npm run coverage
2322
- run: npm run lint
2423

2524
publish-npm:
@@ -30,7 +29,7 @@ jobs:
3029
- uses: actions/checkout@v2
3130
- uses: actions/setup-node@v1
3231
with:
33-
node-version: 20
32+
node-version: "20.x"
3433
registry-url: https://registry.npmjs.org/
3534
- run: npm ci
3635
- run: npm run build

.release-it.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore: release v${version}"
4+
},
5+
"github": {
6+
"release": true
7+
}
8+
}

0 commit comments

Comments
 (0)