Skip to content

Commit f22a611

Browse files
committed
chore: Add GHA workflow for publishing to npm
1 parent e644559 commit f22a611

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-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: "Publish to npm"
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
name: Publish release to npm
10+
runs-on: [self-hosted, lob-runner, x64, Linux]
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Use Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.node-version'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Run tests and linter
25+
run: npm test
26+
27+
- name: Enforce coverage
28+
run: npm run enforce
29+
30+
- name: publish to npm
31+
id: publish
32+
uses: JS-DevTools/npm-publish@v3
33+
with:
34+
token: ${{ secrets.NPM_TOKEN }}
35+
36+

0 commit comments

Comments
 (0)