From 276df7cf2fd1b4450941822c4d7e39481f143a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=91=B8=E9=B1=BC=E5=8E=BB?= <1780903673@qq.com> Date: Thu, 8 May 2025 23:03:07 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=9A=80=20remove=20android=20work?= =?UTF-8?q?flow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-android.yml | 84 ---------------------------- 1 file changed, 84 deletions(-) delete mode 100644 .github/workflows/deploy-android.yml diff --git a/.github/workflows/deploy-android.yml b/.github/workflows/deploy-android.yml deleted file mode 100644 index 0817cd0f..00000000 --- a/.github/workflows/deploy-android.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Sync to APP BASE - -on: - push: - branches: - - release - -jobs: - deploy-and-sync: - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v4 - with: - fetch-depth: 0 # 确保获取完整的提交历史 - - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - uses: pnpm/action-setup@v4 - name: Install pnpm - - - name: Install dependencies - run: pnpm install - - - name: Build Site - run: pnpm build:app-android - - - name: Extract version from package.json - run: | - echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV - echo "CODE=$(git rev-list --count HEAD)" >> $GITHUB_ENV - echo "APPID=${{ secrets.UNI_APPID }}" >> $GITHUB_ENV - - - name: Update manifest.json with id, version, and commit count - run: | - id=${{ secrets.UNI_APPID }} - version=$(jq -r '.version' package.json) - commit_count=$(git rev-list --count HEAD) - jq --arg id "$id" --arg version "$version" --arg commit_count "$commit_count" '.id = $id | .appid = $id | .version.name = $version | .version.code = $commit_count' dist/build/app/manifest.json > tmp_manifest.json && mv tmp_manifest.json dist/build/app/manifest.json - - cat dist/build/app/manifest.json - - name: Print manifest.json - run: cat dist/build/app/manifest.json - - name: Package artifact - uses: actions/upload-artifact@v2 - with: - name: app-artifact - path: dist/build/app - - - name: Checkout app-base - uses: actions/checkout@v4 - with: - repository: Moonofweisheng/uniapp-android-base - token: ${{ secrets.PAT }} - - - name: Download artifact - uses: actions/download-artifact@v2 - with: - name: app-artifact - path: dist/build/app - - - name: Clear and prepare app directory - run: | - cd app/src/main/assets/apps - rm -rf * - mkdir -p "${{ secrets.UNI_APPID }}/www" - - - name: Copy build artifacts to app-base - run: | - cp -r dist/build/app/* "app/src/main/assets/apps/${{ secrets.UNI_APPID }}/www" - - - name: Commit and push changes - run: | - git config --global user.email "Moonofweisheng" - git config --global user.name "1780903673@qq.com" - version=$(echo "$VERSION") # 从环境变量中获取version - git add . - git commit -m "sync appid$APPID v$version code$CODE" - git push