Skip to content

Commit

Permalink
feat: add initial workflow to publish package to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
NuclearRedeye committed Jun 11, 2024
1 parent 52acc5d commit cf75423
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to NPM

on:
push:
branches:
- master
tags:
- v*
pull_request:

jobs:
cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
# Only publish for a tagged release that starts with a lowercase v
- name: Publish to npmjs.com
if: contains(github.ref, 'refs/tags/v')
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit cf75423

Please sign in to comment.