Skip to content

Commit f6c2c55

Browse files
committed
ci: add Conventional Commits and release automation (#11)
1 parent 659f7da commit f6c2c55

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/commitlint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Conventional Commit Linter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
commitlint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 100
16+
- uses: wagoid/commitlint-github-action@v2
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
release_created: ${{ steps.release.outputs.release_created }}
13+
steps:
14+
- uses: google-github-actions/release-please-action@v3
15+
id: release
16+
with:
17+
release-type: node
18+
package-name: node-core-utils
19+
npm-publish:
20+
needs: release-please
21+
if: ${{ needs.release-please.outputs.release_created }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: lts/*
28+
registry-url: 'https://registry.npmjs.org'
29+
- run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)