Skip to content

Commit 585f65b

Browse files
authored
Recreate latest tag before releasing
1 parent 62e6a77 commit 585f65b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
with:
5555
name: ShatterStack-${{ runner.os }}.zip
5656
path: zip_output/ShatterStack-${{ runner.os }}.zip
57-
5857
release:
5958
name: Create GitHub Release
6059
needs: build
@@ -63,20 +62,32 @@ jobs:
6362
- name: Checkout repository
6463
uses: actions/checkout@v4
6564
with:
66-
fetch-depth: 1
67-
65+
fetch-depth: 0
66+
6867
- name: Download All Zipped Builds
6968
uses: actions/download-artifact@v4
7069
with:
7170
path: downloads
72-
71+
7372
- name: Delete Old Release (if exists)
7473
continue-on-error: true
7574
run: gh release delete latest -y
7675
env:
7776
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
77+
78+
- name: Delete Git tag (if exists)
79+
continue-on-error: true
80+
run: |
81+
git push origin :refs/tags/latest
82+
git tag -d latest
83+
84+
- name: Recreate Git tag at HEAD
85+
run: |
86+
git tag latest
87+
git push origin latest
88+
7989
- name: Create the new release
8090
run: gh release create latest downloads/**/ShatterStack-*.zip --title "Latest Build" --notes "Most recent multi-platform builds of ShatterStack"
8191
env:
8292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+

0 commit comments

Comments
 (0)