diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1eba4f..fd54b99 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,8 +14,17 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup - uses: ./.github/actions/setup + - 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 Dependencies 💚 run: | @@ -31,6 +35,13 @@ jobs: pnpm build tar -czvf agora-rtc-sdk-ng-fake.tar.gz dist + - name: publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cd dist + npm publish --no-git-checks + - name: Upload Artifact ⬆️ uses: actions/upload-artifact@v3 with: @@ -59,4 +70,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/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/package.json b/package.json index 0f4f6de..1c9e6b4 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.4", "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..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", - version: "1.0.0", + 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"); 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";