Skip to content

Commit

Permalink
chore: DEVP-578 add a github action to publish to npm and gpr (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal authored Aug 18, 2021
1 parent a4e14d4 commit ca115e9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
registry-url: "https://registry.npmjs.org"
cache: "npm"

- name: Install dependencies
run: npm install

- name: Publish package to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.ENVOY_NPM_AUTOMATION_TOKEN }}

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
registry-url: "https://npm.pkg.github.com"
cache: "npm"

- name: Publish package to GitHub Package Registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ca115e9

Please sign in to comment.