Skip to content

Commit 7694fee

Browse files
authored
Merge branch 'main' into extend-python-checks
2 parents 0cebca4 + 04baa04 commit 7694fee

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616
required: false
1717
type: string
1818
default: ""
19+
mark_as_latest:
20+
description: "Mark this release as latest"
21+
required: false
22+
type: boolean
23+
default: true
1924

2025
permissions:
2126
contents: write
@@ -156,18 +161,15 @@ jobs:
156161
--target "${{ inputs.commit_sha }}" \
157162
release/*
158163
159-
- name: Update latest tag
164+
- name: Mark as latest release
165+
if: ${{ inputs.mark_as_latest }}
166+
env:
167+
GH_TOKEN: ${{ github.token }}
160168
run: |
161-
git config user.name "github-actions[bot]"
162-
git config user.email "github-actions[bot]@users.noreply.github.com"
163-
164-
# Delete existing latest tag if it exists
165-
git tag -d latest 2>/dev/null || true
166-
git push origin :refs/tags/latest 2>/dev/null || true
167-
168-
# Create new latest tag pointing to the release commit
169-
git tag latest "${{ inputs.commit_sha }}"
170-
git push origin latest
169+
# Mark this release as the latest
170+
gh release edit "${{ inputs.version }}" \
171+
--repo "${{ github.repository }}" \
172+
--latest
171173
172174
- name: Output release URL
173175
run: |

0 commit comments

Comments
 (0)