Skip to content

Commit

Permalink
adds npm publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
pstaender committed Apr 22, 2024
1 parent 1ce6895 commit 4cbd9f4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -3,7 +3,7 @@ name: build-and-test
on: [push]

jobs:
test:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,18 @@
name: Publish csv2md to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm run build-and-test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 4cbd9f4

Please sign in to comment.