diff --git a/.github/workflows/androidsign.yml b/.github/workflows/androidsign.yml index 86ebe00..fcaef16 100644 --- a/.github/workflows/androidsign.yml +++ b/.github/workflows/androidsign.yml @@ -70,6 +70,16 @@ jobs: with: path: NLChat # 确保代码被检出到NLChat目录 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: | + cd NLChat + npm install + - name: Download Signed APK uses: actions/download-artifact@v3 with: @@ -85,13 +95,6 @@ jobs: exit 1 fi - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: "NLChat_${{ github.ref_name }}.apk" - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # 使用 PAT - generateReleaseNotes: true - - name: Bump version and generate changelog id: version run: | @@ -101,8 +104,7 @@ jobs: git fetch origin git branch -a # 列出所有分支,调试信息 git checkout ${{ github.ref_name }} || git checkout -b ${{ github.ref_name }} origin/${{ github.ref_name }} - npm install -g standard-version - npx standard-version --release-as ${{ github.ref_name }} + npx standard-version --release-as minor git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git push --follow-tags origin ${{ github.ref_name }} env: @@ -127,6 +129,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # 使用环境变量 continue-on-error: true + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: "NLChat_${{ github.ref_name }}.apk" + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # 使用 PAT + generateReleaseNotes: true + continue-on-error: true multi-platform-test: runs-on: ubuntu-latest