Skip to content

Commit 84730fc

Browse files
committed
refactor: delete old nightly tag along with release
1 parent 3efcaf8 commit 84730fc

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/nightly.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,7 @@ jobs:
117117
env:
118118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119119

120-
- name: Delete old nightly release if it exists
121-
if: steps.check_nightly.outputs.release_exists
122-
run: |
123-
gh release delete nightly -y
124-
env:
125-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126-
127-
- name: Get commit SHA
120+
- name: Get commit SHA of the last nightly release
128121
id: get_commit_sha
129122
if: steps.check_nightly.outputs.release_exists
130123
run: |
@@ -142,13 +135,14 @@ jobs:
142135
"sha": "${{ steps.get_commit_sha.outputs.prev_SHA }}"
143136
}'
144137
145-
- name: Remove current nightly tag before release
138+
- name: Delete the existing nightly tag and release
146139
if: steps.check_nightly.outputs.release_exists
147140
run: |
148-
git tag -d nightly
149-
git push origin :refs/tags/nightly
141+
gh release delete nightly -y --cleanup-tag
142+
env:
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
150144

151-
- name: Create Release if it does not exist
145+
- name: Create a new nightly release
152146
id: create_release
153147
run: |
154148
gh release create nightly \

0 commit comments

Comments
 (0)