Skip to content

Commit 840f61f

Browse files
Brian MadisonBrian Madison
authored andcommitted
chore: add publish workflow and fix gitignore
- Add .github/workflows/publish.yaml for auto-publish on tag push - Fix .gitignore to not block .github/ directory
1 parent c616211 commit 840f61f

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
id-token: write # Required for OIDC
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Run format check
29+
run: npm run format:check
30+
31+
- name: Publish to NPM
32+
run: npm publish --provenance
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)