Skip to content

Commit 4615cf2

Browse files
fix: slill...$
1 parent 696e639 commit 4615cf2

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

‎.github/workflows/publish-release.yml‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
contents: write
1616
pull-requests: write
1717
id-token: write
18+
env:
19+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # single source of truth for gh CLI auth across all steps
1820

1921
steps:
2022
- uses: actions/checkout@v2
@@ -35,9 +37,6 @@ jobs:
3537
- name: Install GitHub CLI
3638
run: |
3739
choco install gh
38-
- name: Authenticate GitHub CLI
39-
run: |
40-
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
4140
4241
- name: Create a new branch and commit the version change
4342
# Delete branch remotely version-sync-branch (if exists)
@@ -48,8 +47,6 @@ jobs:
4847
else
4948
echo "Branch version-sync-branch does not exist."
5049
fi
51-
env:
52-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5350
shell: bash
5451
# Create new branch and commit version change
5552
- run: |
@@ -58,25 +55,17 @@ jobs:
5855
git checkout -b version-sync-branch
5956
git commit -am "ACTION_BOT: Sync version for release"
6057
git push --set-upstream origin version-sync-branch
61-
env:
62-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6358
# Close existing pull requests for version-sync-branch
6459
- run: |
6560
gh pr list --state open --head version-sync-branch --json number --jq '.[].number' | ForEach-Object { gh pr close $_ }
66-
env:
67-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6861
shell: pwsh
6962
# Create pull request
7063
- run: |
7164
gh pr create --title "ACTION_BOT: Sync version for release" --body "Sync version for release" --base main --head version-sync-branch --label ACTION_BOT
72-
env:
73-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7465
# Merge pull request
7566
- run: |
7667
$pr = gh pr list --head version-sync-branch --json number --jq '.[0].number'
7768
gh pr merge $pr --squash --delete-branch --admin
78-
env:
79-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8069
shell: pwsh
8170
8271
build-ghusers:

0 commit comments

Comments
 (0)