Skip to content

Commit 84ea81d

Browse files
authored
Merge pull request #802 from azooKey/fix/release
Fix release workflow permissions and checkout ref
2 parents 4f3876e + 603132b commit 84ea81d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
name: Create Release on Merge
44

55
on:
6-
pull_request:
6+
pull_request_target:
77
types: [closed]
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
release:
1114
# Run only when the pull request was actually merged (not just closed)
@@ -17,6 +20,8 @@ jobs:
1720
steps:
1821
- name: Checkout repository
1922
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ github.event.pull_request.merge_commit_sha }}
2025

2126
# Generate a tag based on current UTC date‑time down to seconds, e.g., v20250504123045
2227
- name: Set release tag
@@ -31,4 +36,4 @@ jobs:
3136
generate_release_notes: true
3237
files: Dictionary/data_v1.json
3338
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)