Skip to content

Commit cb8ef74

Browse files
committed
feat: add GitHub Actions workflow for publishing Prettier plugin to npm
1 parent 88ce70b commit cb8ef74

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Prettier Plugin to npm
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
id-token: write
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: prettier-plugin
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- run: npm install
25+
26+
- run: npm test
27+
28+
- run: npm publish --provenance
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)