diff --git a/.github/workflows/update-version-file-on-release.yml b/.github/workflows/update-version-file-on-release.yml index c648e7b..ddbad27 100644 --- a/.github/workflows/update-version-file-on-release.yml +++ b/.github/workflows/update-version-file-on-release.yml @@ -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 @@ -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 @@ -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 }}" @@ -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({