Skip to content

Commit

Permalink
Create npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Mar 24, 2021
1 parent e96fb34 commit 6d066cd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12]

name: node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies & build
run: |
npm ci
npm run build --if-present
- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 6d066cd

Please sign in to comment.