-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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 # 原始仓库的目标分支 | ||
|