diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a0a696b0..5de4b9c0 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -12,5 +12,5 @@ runs: - name: Setup Node 💚 uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18 cache: "pnpm" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c8c6e19d..45a15d54 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,15 +3,19 @@ name: Publish to NPM on: workflow_dispatch: inputs: + package: + type: choice + description: "choose package" + default: "agora-rtc-react" + required: true + options: + - agora-rtc-react + - agora-rtc-react-ui increment: description: 'Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]' required: true default: "patch" type: string - releases: - description: "create Releases, choose false if specify version" - default: true - type: boolean dry-run: description: "Do not touch or write anything, but show the commands" default: true @@ -42,8 +46,7 @@ jobs: - name: Dry Run Release if: ${{ inputs.dry-run }} run: | - npm whoami - pnpm -F agora-rtc-react release ${{ inputs.increment }} -d --ci + pnpm -F ${{ inputs.package }} release ${{ inputs.increment }} -d --ci - name: Config Git if: ${{ !inputs.dry-run }} @@ -59,9 +62,9 @@ jobs: - name: Update VERSION if: ${{ !inputs.dry-run }} run: | - pnpm -F agora-rtc-react exec esbuild-dev $PWD/scripts/release/update-version.ts target:agora-rtc-react @${{ inputs.increment }} + pnpm -F ${{ inputs.package }} exec esbuild-dev $PWD/scripts/release/update-version.ts target:${{ inputs.package }} @${{ inputs.increment }} - name: NPM Publish if: ${{ !inputs.dry-run }} run: | - pnpm -F agora-rtc-react release ${{ inputs.increment }} --ci --github.release=${{ inputs.releases }} + pnpm -F ${{ inputs.package }} release ${{ inputs.increment }} --ci --github.release=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..6d80269a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.16.0 diff --git a/package.json b/package.json index 34683c8d..fde81acf 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "agora-rtc-react-mono", "private": true, "description": "Agora RTC React SDK", + "engines": { + "node": ">=18", + "pnpm": ">=8" + }, "scripts": { "prepare": "husky install", "build": "pnpm -r run build",