From 0df28bfb0759df0e21b8d984242cd112557788b9 Mon Sep 17 00:00:00 2001 From: Keshav Mohta Date: Sun, 29 Sep 2024 15:00:22 +0530 Subject: [PATCH] added npmrc and publish workflow --- .github/workflows/publish.yml | 25 +++++++++++++++++++ .npmrc | 1 + ...de-workspace => repo-health.code-workspace | 0 3 files changed, 26 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .npmrc rename health-check.code-workspace => repo-health.code-workspace (100%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..36b1667 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..c8320b3 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@xkeshav:registry=https://npm.pkg.github.com \ No newline at end of file diff --git a/health-check.code-workspace b/repo-health.code-workspace similarity index 100% rename from health-check.code-workspace rename to repo-health.code-workspace