Skip to content

Commit 26425f6

Browse files
tidy-devCopilot
andcommitted
Address Copilot review: permissions, GITHUB_TOKEN, tag fixes
- Add pull-requests: read permission for PR metadata API calls - Pass GITHUB_TOKEN alongside COPILOT_GITHUB_TOKEN - Set target_commitish on release to ensure correct tag target - Point major version tag at github.sha instead of version tag - Use refs/tags/ prefix to avoid branch/tag ambiguity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 895f368 commit 26425f6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
permissions:
2020
contents: write
21+
pull-requests: read
2122

2223
steps:
2324
- uses: actions/checkout@v4
@@ -52,6 +53,7 @@ jobs:
5253
base-ref: ${{ steps.version.outputs.previous }}
5354
head-ref: ${{ github.sha }}
5455
env:
56+
GITHUB_TOKEN: ${{ github.token }}
5557
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
5658

5759
- name: Create GitHub Release
@@ -61,8 +63,9 @@ jobs:
6163
name: ${{ steps.version.outputs.next }}
6264
body: ${{ steps.notes.outputs.release-notes }}
6365
draft: true
66+
target_commitish: ${{ github.sha }}
6467

6568
- name: Update major version tag
6669
run: |
67-
git tag -f "${{ steps.version.outputs.major }}" "${{ steps.version.outputs.next }}"
68-
git push origin "${{ steps.version.outputs.major }}" --force
70+
git tag -f "${{ steps.version.outputs.major }}" "${{ github.sha }}"
71+
git push origin "refs/tags/${{ steps.version.outputs.major }}" --force

0 commit comments

Comments
 (0)