Skip to content

Commit

Permalink
12312
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Oct 21, 2024
1 parent e138a60 commit 397ea41
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/update-version-file-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
update-version:
runs-on: ubuntu-latest
env:
TAG_VERSION: ${{ github.event.release.tag_name }}
TAG_VERSION: ${{ github.event.release.tag_name }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
steps:
# Step 1: Checkout the original repository's code
- name: Checkout code
Expand All @@ -19,8 +20,8 @@ jobs:
# Step 2: Set up Git with official account
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "OpenIM-Robot"
git config user.email "OpenIM-Robot@users.noreply.github.com"
# Step 3: Check and delete existing tag
- name: Check and delete existing tag
Expand All @@ -38,7 +39,8 @@ jobs:
# Step 5: Commit and push changes to the correct branch
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
git add version/version
git commit -m "Update version to ${{ env.TAG_VERSION }}"
Expand All @@ -56,7 +58,7 @@ jobs:
- name: Find and Publish Draft Release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.BOT_TOKEN }}
script: |
// Get the list of releases
const releases = await github.rest.repos.listReleases({
Expand Down

0 comments on commit 397ea41

Please sign in to comment.