Skip to content

Commit 6c0c645

Browse files
Merge pull request #191 from diffCheckOrg/release/2.0.0
fix to CI release workflow
2 parents 00cbf3b + 10b522e commit 6c0c645

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
################################################################################
1212
sync-version:
1313
runs-on: windows-latest
14+
permissions:
15+
contents: write
16+
id-token: write
1417

1518
steps:
1619
- uses: actions/checkout@v2
@@ -45,7 +48,7 @@ jobs:
4548
echo "Branch version-sync-branch does not exist."
4649
fi
4750
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4952
shell: bash
5053
# Create new branch and commit version change
5154
- run: |
@@ -55,24 +58,24 @@ jobs:
5558
git commit -am "ACTION_BOT: Sync version for release"
5659
git push --set-upstream origin version-sync-branch
5760
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5962
# Close existing pull requests for version-sync-branch
6063
- run: |
6164
gh pr list --state open --head version-sync-branch --json number --jq '.[].number' | ForEach-Object { gh pr close $_ }
6265
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6467
shell: pwsh
6568
# Create pull request
6669
- run: |
6770
gh pr create --title "ACTION_BOT: Sync version for release" --body "Sync version for release" --base main --head version-sync-branch --label ACTION_BOT
6871
env:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7073
# Merge pull request
7174
- run: |
7275
$pr = gh pr list --head version-sync-branch --json number --jq '.[0].number'
7376
gh pr merge $pr --squash --delete-branch --admin
7477
env:
75-
GITHUB_TOKEN: ${{ secrets.DF_COBOT_PAT_TOKEN }}
78+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7679
shell: pwsh
7780
7881
build-ghusers:

0 commit comments

Comments
 (0)