Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriLojda committed Jan 23, 2024
1 parent f5fb7a1 commit 2ed9ce8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
release:
types: [published]

name: publish-to-npm
jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access=public
if: ${{!github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
- run: npm publish --tag prerelease
if: ${{github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}

0 comments on commit 2ed9ce8

Please sign in to comment.