Skip to content

Commit 14187b4

Browse files
authored
Update nightly.yml
1 parent 6aa721b commit 14187b4

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/nightly.yml

+20-11
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ jobs:
6060
id: createpackage
6161
- name: List output directory
6262
run: ls -lah out/
63-
- name: Upload to GitHub Release
64-
uses: ncipollo/[email protected]
65-
with:
66-
token: ${{ secrets.GITHUB_TOKEN }}
67-
tag: "nightly"
68-
artifacts: |
69-
out/of_v*.tar.gz
70-
out/of_v*.zip
71-
allowUpdates: true
72-
removeArtifacts: true
73-
replacesArtifacts: true
7463
# - name: Upload to GitHub Release
7564
# uses: softprops/[email protected]
7665
# with:
@@ -79,3 +68,23 @@ jobs:
7968
# files: |
8069
# out/of_v*.tar.gz
8170
# out/of_v*.zip
71+
# Delete the existing release (but NOT the tag)
72+
- name: Delete existing nightly release if exists
73+
env:
74+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
run: |
76+
gh release delete nightly --yes || true
77+
# Recreate nightly release associated with existing tag
78+
- name: Create new nightly release and upload assets
79+
env:
80+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
run: |
82+
gh release create nightly \
83+
--title "Nightly Release" \
84+
--notes "Auto-generated nightly build." \
85+
out/of_v*.tar.gz out/of_v*.zip || \
86+
gh release create nightly \
87+
--title "Nightly Release" \
88+
--notes "Auto-generated nightly build." \
89+
--target ${{ github.sha }} \
90+
out/of_v*.tar.gz out/of_v*.zip

0 commit comments

Comments
 (0)