Skip to content

Commit

Permalink
Add NPM publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillis Van Ginderachter committed Feb 4, 2021
1 parent 7c785f3 commit cf1de25
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: pnpm/action-setup@v1
with:
version: 4.11.1
- run: pnpm recursive test

publish-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/
- uses: pnpm/action-setup@v1
with:
version: 4.11.1
- run: pnpm recursive publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- uses: pnpm/action-setup@v1
with:
version: 4.11.1
- run: pnpm recursive publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit cf1de25

Please sign in to comment.