diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4aec3b2..7b25931 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,9 +3,12 @@ name: Create Release on Merge on: - pull_request: + pull_request_target: types: [closed] +permissions: + contents: write + jobs: release: # Run only when the pull request was actually merged (not just closed) @@ -17,6 +20,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} # Generate a tag based on current UTC date‑time down to seconds, e.g., v20250504123045 - name: Set release tag @@ -31,4 +36,4 @@ jobs: generate_release_notes: true files: Dictionary/data_v1.json env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}