Skip to content

Commit

Permalink
Merge pull request #513 from aneeshrelan/feature/automate-publish-to-…
Browse files Browse the repository at this point in the history
…npm-github

ci: add github action to publish to npm and github packages
  • Loading branch information
shivammathur committed Oct 5, 2021
2 parents d7c3e33 + b3bf0f3 commit 4ce6f3c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,28 @@
name: Publish Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
# Publish to npm
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
# Publish to GitHub Packages
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4ce6f3c

Please sign in to comment.