Skip to content

Commit

Permalink
added npmrc and publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xkeshav committed Sep 29, 2024
1 parent f85ecc0 commit 0df28bf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package to GitHub Packages
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@xkeshav"
- name: Install dependencies
run: yarn
- name: Publish package
run: yarn publish --access restricted
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@xkeshav:registry=https://npm.pkg.github.com
File renamed without changes.

0 comments on commit 0df28bf

Please sign in to comment.