Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add github action to publish to npm and github packages #513

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shivammathur marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
# Publish to GitHub Packages
- run: npm publish --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shivammathur marked this conversation as resolved.
Show resolved Hide resolved