Skip to content

Commit

Permalink
chore: Add GHA workflow for publishing to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpjones committed Sep 17, 2024
1 parent e644559 commit e2cd6f6
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Publish to npm"

on:
release:
types: [created]

jobs:
publish:
name: Publish release to npm
runs-on: [self-hosted, lob-runner, x64, Linux]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Run tests and linter
run: npm test

- name: Enforce coverage
run: npm run enforce

- name: publish to npm
id: publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}


0 comments on commit e2cd6f6

Please sign in to comment.