From f68bc044a19663b770fd9a9b00ab6e12ff91eade Mon Sep 17 00:00:00 2001
From: gxz <guoxianzhe@agora.io>
Date: Thu, 19 Oct 2023 11:46:35 +0800
Subject: [PATCH] chore: ci

---
 .github/workflows/publish.yml | 4 ++--
 .npmrc                        | 1 -
 scripts/build-finished.ts     | 5 ++++-
 3 files changed, 6 insertions(+), 4 deletions(-)
 delete mode 100644 .npmrc

diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index c9733b5..b173d5e 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -16,7 +16,7 @@ jobs:
         with:
           fetch-depth: 0
           token: ${{ secrets.GITHUB_TOKEN }}
-          
+
       - uses: pnpm/action-setup@v2.2.4
         with:
           version: latest
@@ -42,8 +42,8 @@ jobs:
         env:
           NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
+          cd dist
           npm publish --no-git-checks
-        working-directory: dist
 
       - name: Upload Artifact ⬆️
         uses: actions/upload-artifact@v3
diff --git a/.npmrc b/.npmrc
deleted file mode 100644
index 036d0e0..0000000
--- a/.npmrc
+++ /dev/null
@@ -1 +0,0 @@
-@agoraio-extensions:registry=https://npm.pkg.github.com
diff --git a/scripts/build-finished.ts b/scripts/build-finished.ts
index 7cd761d..3eb4c09 100644
--- a/scripts/build-finished.ts
+++ b/scripts/build-finished.ts
@@ -6,10 +6,13 @@ const pkg = require("../package.json");
 const distDir = "dist";
 
 const packageData = {
-  name: "agora-rtc-sdk-ng-fake",
+  name: `${pkg.name}`,
   version: `${pkg.version}`,
   description: "Fake Agora Web RTC for testing",
   main: `${pkg.name}_${pkg.version}.js`,
+  publishConfig: {
+    registry: "https://npm.pkg.github.com",
+  },
 };
 
 const packagePath = path.join(distDir, "package.json");