diff --git a/.github/workflows/assemble_android_debug.yml b/.github/workflows/assemble_android_debug.yml index f48ae77..5511327 100644 --- a/.github/workflows/assemble_android_debug.yml +++ b/.github/workflows/assemble_android_debug.yml @@ -35,6 +35,9 @@ env: jobs: assemble: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] steps: - name: Checkout Project uses: actions/checkout@v2 @@ -42,30 +45,16 @@ jobs: with: distribution: 'zulu' java-version: '17' - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install Dependencies - run: | - yarn - - name: Build Taro React Native Bundle - run: | - yarn build:rn --platform android + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Cache Gradle uses: actions/cache@v2 env: diff --git a/.github/workflows/assemble_android_release.yml b/.github/workflows/assemble_android_release.yml index c3c718a..27a6586 100644 --- a/.github/workflows/assemble_android_release.yml +++ b/.github/workflows/assemble_android_release.yml @@ -35,6 +35,9 @@ env: jobs: assemble: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] steps: - name: Checkout Project uses: actions/checkout@v2 @@ -42,27 +45,16 @@ jobs: with: distribution: 'zulu' java-version: '17' - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install Dependencies - run: | - yarn + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Cache Gradle uses: actions/cache@v2 env: diff --git a/.github/workflows/assemble_ios_debug.yml b/.github/workflows/assemble_ios_debug.yml index 8bce0e9..2d203b5 100644 --- a/.github/workflows/assemble_ios_debug.yml +++ b/.github/workflows/assemble_ios_debug.yml @@ -27,27 +27,22 @@ env: jobs: assemble: runs-on: macos-13 + strategy: + matrix: + node-version: [20] steps: - name: Checkout Project uses: actions/checkout@v2 - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Cache Pods uses: actions/cache@v2 with: @@ -55,12 +50,6 @@ jobs: key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - - name: Install Dependencies - run: | - yarn - - name: Build Taro React Native Bundle - run: | - yarn build:rn --platform ios - name: Install pods run: cd ios && pod update --no-repo-update - name: Import signing certificate diff --git a/.github/workflows/assemble_ios_release.yml b/.github/workflows/assemble_ios_release.yml index 6868bc4..db1a435 100644 --- a/.github/workflows/assemble_ios_release.yml +++ b/.github/workflows/assemble_ios_release.yml @@ -30,30 +30,25 @@ env: jobs: assemble: runs-on: macos-13 + strategy: + matrix: + node-version: [20] steps: - name: Get current date id: date run: echo "::set-output name=timestamp::$(TZ=Asia/Shanghai date +'%y%m%d%H%M')" - name: Checkout Project uses: actions/checkout@v2 - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Cache Pods uses: actions/cache@v2 with: @@ -61,9 +56,6 @@ jobs: key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - - name: Install Dependencies - run: | - yarn - name: Install pods run: cd ios && pod update --no-repo-update - name: Import signing certificate diff --git a/.github/workflows/assemble_weapp_release.yml b/.github/workflows/assemble_weapp_release.yml index 48b0a29..415fd15 100644 --- a/.github/workflows/assemble_weapp_release.yml +++ b/.github/workflows/assemble_weapp_release.yml @@ -20,35 +20,26 @@ env: jobs: deploy: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] steps: - uses: actions/checkout@v3 - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install Dependencies - run: | - yarn + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Import Weapp Key run: echo "$WEAPP_KEY" | base64 --decode > key/private.appid.key env: WEAPP_KEY: ${{ env.WEAPP_KEY }} - name: Build Taro Playground Weapp - run: | - yarn build:weapp -- --upload + run: pnpm build:weapp -- --upload env: WEAPP_ID: ${{ env.WEAPP_ID }} diff --git a/.github/workflows/assemble_web_release.yml b/.github/workflows/assemble_web_release.yml index b771d5d..8d780bc 100644 --- a/.github/workflows/assemble_web_release.yml +++ b/.github/workflows/assemble_web_release.yml @@ -13,32 +13,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] steps: - uses: actions/checkout@v3 - - name: Cache node_modules Folder - uses: actions/cache@v2 + - uses: pnpm/action-setup@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-node_modules - restore-keys: ${{ runner.os }}-node_modules - - name: Get Yarn Cache Directory Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache Yarn - uses: actions/cache@v2 - env: - cache-name: yarn-cache + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install Dependencies - run: | - yarn + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - name: Build Taro Playground Web - run: | - yarn build:h5 + run: pnpm build:h5 - name: Deploy github pages uses: peaceiris/actions-gh-pages@v3 with: diff --git a/README.md b/README.md index f475c63..37bda0c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ https://testflight.apple.com/join/RDFCp2yy > **run this script after the project is initialized.** ``` -yarn upgradePeerdeps +pnpm upgradePeerdeps ``` ### pod install @@ -45,31 +45,31 @@ yarn upgradePeerdeps > see [pod-install](https://www.npmjs.com/package/pod-install) for more information. ``` -yarn podInstall +pnpm podInstall ``` ### start ios app ``` -yarn ios +pnpm ios ``` ### start android app ``` -yarn android +pnpm android ``` ### start bundler ``` -yarn start +pnpm start ``` ### reset cache and start bundler ``` -yarn start --reset-cache +pnpm start --reset-cache ``` ### more information @@ -83,13 +83,13 @@ yarn start --reset-cache ### build ios bundle ``` -yarn build:rn --platform ios +pnpm build:rn --platform ios ``` ### build Android bundle ``` -yarn build:rn --platform android +pnpm build:rn --platform android ``` ### release ios APP @@ -197,7 +197,7 @@ This project supports web and mini program, but it has not been fully tested. ### start web server ```shell -yarn dev:h5 +pnpm dev:h5 ``` ### Github workflows of Web @@ -207,7 +207,7 @@ see [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) ### start wechat mini program ```shell -yarn dev:weapp +pnpm dev:weapp ``` ### Github workflows of Wechat Mini Program @@ -232,6 +232,14 @@ values like ${{secrets.xxxxx}} are manually generated and store in your github e cat private.$WEAPP_ID.key | base64 | pbcopy ``` +## Harmony support + +### start harmony + +```shell +pnpm dev:harmony +``` + ## Attention The source code is customized for the Taro playground application and is for reference only. If you want to use it directly, please make the following changes.