From 587fc8280abd5a5f3feb753cc8109727fb18ad2c Mon Sep 17 00:00:00 2001 From: gxz Date: Thu, 19 Oct 2023 11:20:06 +0800 Subject: [PATCH 01/10] chore: ci --- .github/workflows/publish.yml | 21 +++++++++++++++------ package.json | 5 +++-- scripts/build-finished.ts | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1eba4f..0f54df5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,11 +2,6 @@ name: Release and Publish on: workflow_dispatch: - inputs: - publish-npm: - description: "choose true if want publish to npm" - default: false - type: boolean jobs: release-it: @@ -19,6 +14,13 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 + with: + node-version: "16.x" + registry-url: "https://npm.pkg.github.com" + # Defaults to the user or organization that owns the workflow file + scope: "@agoraio-extensions" + - name: Setup uses: ./.github/actions/setup @@ -31,6 +33,13 @@ jobs: pnpm build tar -czvf agora-rtc-sdk-ng-fake.tar.gz dist + - name: publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pnpm publish + working-directory: dist + - name: Upload Artifact ⬆️ uses: actions/upload-artifact@v3 with: @@ -59,4 +68,4 @@ jobs: - name: Release and Publish run: | - pnpm release ${{ steps.package-info.outputs.version }} --ci --npm.publish=${{ inputs.publish-npm }} --github.assets=agora-rtc-sdk-ng-fake.tar.gz + pnpm release ${{ steps.package-info.outputs.version }} --ci --github.assets=agora-rtc-sdk-ng-fake.tar.gz diff --git a/package.json b/package.json index 0f4f6de..aa078fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "agora-rtc-sdk-ng-fake", - "version": "1.0.2", + "name": "@agoraio-extensions/agora-rtc-sdk-ng-fake", + "version": "1.0.3", "private": true, "description": "Fake Agora Web RTC for testing", "repository": { @@ -109,6 +109,7 @@ "before:init": "git fetch --prune --prune-tags origin" }, "npm": { + "publish": false, "allowSameVersion": true }, "github": { diff --git a/scripts/build-finished.ts b/scripts/build-finished.ts index 8f102b1..7cd761d 100644 --- a/scripts/build-finished.ts +++ b/scripts/build-finished.ts @@ -7,7 +7,7 @@ const distDir = "dist"; const packageData = { name: "agora-rtc-sdk-ng-fake", - version: "1.0.0", + version: `${pkg.version}`, description: "Fake Agora Web RTC for testing", main: `${pkg.name}_${pkg.version}.js`, }; From a9d43b8a2f4961110e759044f65d591b20f9b819 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:24:30 +0800 Subject: [PATCH 02/10] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0f54df5..9fe33e7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,7 +37,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - pnpm publish + pnpm publish --no-git-checks working-directory: dist - name: Upload Artifact ⬆️ From 222def6c595f4ee28346a1f31495b12d11f8a396 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:26:28 +0800 Subject: [PATCH 03/10] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9fe33e7..fde975b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,7 +37,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - pnpm publish --no-git-checks + npm publish --no-git-checks working-directory: dist - name: Upload Artifact ⬆️ From 90e62d846c396fad846141a8cc650fc07435f682 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:28:09 +0800 Subject: [PATCH 04/10] Update publish.yml --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fde975b..13f5004 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,9 @@ on: jobs: release-it: runs-on: ubuntu-latest + permissions: + contents: read + packages: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: From 649d219241e181bf679aed3893815d3f6a8ce12c Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:31:04 +0800 Subject: [PATCH 05/10] Create .npmrc --- .npmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..036d0e0 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@agoraio-extensions:registry=https://npm.pkg.github.com From 568daf8d9ebb413400485f2905d42ecb7347d26a Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:35:30 +0800 Subject: [PATCH 06/10] Update publish.yml --- .github/workflows/publish.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 13f5004..c9733b5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,17 +16,19 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} + + - uses: pnpm/action-setup@v2.2.4 + with: + version: latest - uses: actions/setup-node@v3 with: node-version: "16.x" + cache: "pnpm" registry-url: "https://npm.pkg.github.com" # Defaults to the user or organization that owns the workflow file scope: "@agoraio-extensions" - - name: Setup - uses: ./.github/actions/setup - - name: Setup Dependencies 💚 run: | pnpm install From f68bc044a19663b770fd9a9b00ab6e12ff91eade Mon Sep 17 00:00:00 2001 From: gxz Date: Thu, 19 Oct 2023 11:46:35 +0800 Subject: [PATCH 07/10] 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"); From 7882e79ae8a1f16a43149eee03f5dc31d82e2747 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:53:34 +0800 Subject: [PATCH 08/10] Update publish.yml --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b173d5e..fd54b99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,9 +6,6 @@ on: jobs: release-it: runs-on: ubuntu-latest - permissions: - contents: read - packages: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: From 0c28cb02268bf32010fc741631bf1d31a05dc154 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:54:56 +0800 Subject: [PATCH 09/10] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa078fd..1c9e6b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agoraio-extensions/agora-rtc-sdk-ng-fake", - "version": "1.0.3", + "version": "1.0.4", "private": true, "description": "Fake Agora Web RTC for testing", "repository": { From 35c51ff9c8880d655f4c21a1bfc00a7e2811290a Mon Sep 17 00:00:00 2001 From: guoxianzhe Date: Thu, 19 Oct 2023 03:55:44 +0000 Subject: [PATCH 10/10] chore: release 1.0.4 --- CHANGELOG.md | 2 ++ src/version.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1f9c2..702733e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # agora-rtc-sdk-ng-fake +## [1.0.4](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/compare/v1.0.2...v1.0.4) (2023-10-19) + ## 1.0.2 (2023-10-19) ### Features diff --git a/src/version.ts b/src/version.ts index 9561062..0e972ed 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = "1.0.2"; +export const VERSION = "1.0.4";