Skip to content

Commit

Permalink
Add publishing automation
Browse files Browse the repository at this point in the history
  • Loading branch information
andstor authored Jul 13, 2020
1 parent bb2030e commit 1dab43b
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish package

on:
release:
types:
- published

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Test
uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm run build --if-present
- run: npm test

publish-npm:
name: Publish to npm
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1dab43b

Please sign in to comment.