Skip to content

Commit

Permalink
chore: Adding publish GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed May 6, 2022
1 parent a722b1c commit f9e6dce
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish
on:
release:
types: [ created ]

jobs:
publish:
runs-on: ubuntu-latest
name: Publish

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
if: steps.node-cache.outputs.cache-hit != 'true'

- name: Publish to npm
env:
GH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish

0 comments on commit f9e6dce

Please sign in to comment.