From 0f2d2618f2d6f875d94aec05c7a630dd865ff623 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Thu, 12 Sep 2024 18:58:18 +0800 Subject: [PATCH] u1 --- .github/workflows/upgrade-version-by-tag.yml | 36 ++++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/upgrade-version-by-tag.yml b/.github/workflows/upgrade-version-by-tag.yml index e1fe292..37104ae 100644 --- a/.github/workflows/upgrade-version-by-tag.yml +++ b/.github/workflows/upgrade-version-by-tag.yml @@ -94,31 +94,37 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - # Step 3: Create a new branch for version update - - name: Create new branch for version update - run: | - git checkout -b ${{ env.BRANCH_NAME }} + # # Step 3: Create a new branch for version update + # - name: Create new branch for version update + # run: | + # git checkout -b ${{ env.BRANCH_NAME }} - # Step 4: Update version file + # Step 4: Update version file - name: Update version file run: | echo "${{ env.TAG_VERSION }}" > version/version - git add version/version - git commit -m "Update version to ${{ env.TAG_VERSION }}" - # Step 5: Push the new branch to the repository - - name: Push to repository - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GITHUB_TOKEN 进行身份验证 - run: | - git push origin ${{ env.BRANCH_NAME }} + # # Step 4: Update version file + # - name: Update version file + # run: | + # echo "${{ env.TAG_VERSION }}" > version/version + # git add version/version + # git commit -m "Update version to ${{ env.TAG_VERSION }}" + + # # Step 5: Push the new branch to the repository + # - name: Push to repository + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GITHUB_TOKEN 进行身份验证 + # run: | + # git push origin ${{ env.BRANCH_NAME }} # Step 6: Create a Pull Request from the new branch to the original repository - name: Create Pull Request + id: create_pr uses: peter-evans/create-pull-request@v7.0.1 with: - # token: ${{ secrets.GITHUB_TOKEN }} - token: ${{ secrets.BOT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + # token: ${{ secrets.BOT_TOKEN }} commit-message: "Update version to ${{ env.TAG_VERSION }}" branch: ${{ env.BRANCH_NAME }} base: main # 原始仓库的目标分支