Skip to content

Commit

Permalink
Create npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
procot authored May 28, 2020
1 parent a3d6fef commit f555f6b
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
release:
types: [created]

jobs:
dtslint:
name: dtslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci
- run: npm run dtslint

tslint:
name: TSLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm ci
- run: npm run tslint

type-check:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm ci
- run: npm run type-check

publish-npm:
name: Publish to NPM
needs: [dtslint,tslint,type-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 8
registry-url: https://registry.npmjs.org/
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 comments on commit f555f6b

Please sign in to comment.