Skip to content

Commit

Permalink
Merge pull request #4 from RonRadtke/npm-publish-action
Browse files Browse the repository at this point in the history
set up npm publish GitHub Action
  • Loading branch information
RonRadtke authored Mar 31, 2023
2 parents 031aad3 + 2a673db commit 57fb36c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will publish a package to npm when a release is created.
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

# TODO: add tests or leave them out, add build steps...?

name: npm publish

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
# - run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
# - run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 57fb36c

Please sign in to comment.