Add npm publish workflow.
Document GitHub Actions release-based publishing.
commit04b93c83b9d1e054694a6a69bb3935f8e6500839
authorMark <mark.eibes@gmail.com>
dateWed 28 Jan 2026, 22:22 (8 months ago)
parentac9b631
.github/workflows/publish-npm.ymlnew file+30
@@ -0,0 +1,30 @@
1+name: Publish npm package
2+
3+on:
4+ release:
5+ types: [published]
6+ workflow_dispatch:
7+
8+permissions:
9+ contents: read
10+
11+jobs:
12+ publish:
13+ runs-on: ubuntu-latest
14+ steps:
15+ - uses: actions/checkout@v4
16+
17+ - uses: purescript-contrib/setup-purescript@v1
18+ with:
19+ purescript: "0.15.15"
20+
21+ - uses: actions/setup-node@v4
22+ with:
23+ node-version: "20"
24+ registry-url: "https://registry.npmjs.org"
25+
26+ - run: npm ci
27+ - run: npm run dist
28+ - run: npm publish --access public
29+ env:
30+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
README.md+7
@@ -141,6 +141,13 @@ purelint/
141141
142142## Development
143143
144+### Publishing to npm
145+
146+Publishing is handled by GitHub Actions. Add an `NPM_TOKEN` secret with an
147+automation or granular token that has publish rights for `purslint`, then
148+create a GitHub Release to trigger the workflow. You can also run it manually
149+via the workflow dispatch.
150+
144151### Adding a New Rule
145152
1461531. Create a new file in `lib/purslint/src/Purslint/Rules/`