Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Sep 12, 2024
1 parent e93cd89 commit 8e4889f
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/upgrade-version-by-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ 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
- name: Create new branch for version update
# Step 4: Add a remote pointing to the forked repository
- name: Add fork remote
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
BRANCH_NAME="update-version-${TAG_VERSION}"
git checkout -b $BRANCH_NAME
git remote add fork https://github.com/openimsdk/actions-test.git
git fetch fork
# # Step 3: Create a new branch
# - name: Create new branch for version update
# run: |
# TAG_VERSION=${GITHUB_REF#refs/tags/}
# BRANCH_NAME="update-version-${TAG_VERSION}"
# git checkout -b $BRANCH_NAME

# Step 4: Update version file
- name: Update version file
Expand All @@ -36,17 +42,21 @@ jobs:
# Step 5: Push the new branch
- name: Push branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
BRANCH_NAME="update-version-${TAG_VERSION}"
git push origin $BRANCH_NAME
git push fork $BRANCH_NAME
# Step 6: Create Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
id: create_pr
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: $BRANCH_NAME
# repository: openimsdk/actions-test
branch: github-actions[bot]:$BRANCH_NAME
base: main # Replace 'main' with your default branch if necessary
title: "Update version to $TAG_VERSION"
body: "This PR updates the version file to the new tag version $TAG_VERSION."
base: main # Replace 'main' with your default branch if necessary

0 comments on commit 8e4889f

Please sign in to comment.