Skip to content

Commit 5b902ca

Browse files
authored
Merge pull request #3 from KiraCore/feature/initial-release
feat: initial release
2 parents 8587bd2 + daec6da commit 5b902ca

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,7 @@ jobs:
175175
echo "$FORMATTED_CHANGELOG" >> $GITHUB_OUTPUT
176176
echo "EOF" >> $GITHUB_OUTPUT
177177
178-
- name: Delete existing release (if re-running)
179-
env:
180-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181-
VERSION: ${{ steps.create_tag.outputs.new_tag }}
182-
run: |
183-
# Delete existing release if it exists (for re-runs)
184-
if gh release view $VERSION &>/dev/null; then
185-
echo "Deleting existing release $VERSION..."
186-
gh release delete $VERSION --yes --cleanup-tag=false
187-
fi
188-
189-
- name: Create Release
178+
- name: Create or Update Release
190179
env:
191180
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192181
VERSION: ${{ steps.create_tag.outputs.new_tag }}
@@ -232,7 +221,17 @@ jobs:
232221
```
233222
NOTES
234223
235-
gh release create $VERSION \
236-
--title "Release $VERSION" \
237-
--notes-file /tmp/release_notes.md \
238-
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
224+
# Check if release already exists
225+
if gh release view $VERSION &>/dev/null; then
226+
echo "Release $VERSION exists, updating assets with --clobber..."
227+
gh release upload $VERSION --clobber \
228+
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
229+
# Update release notes
230+
gh release edit $VERSION --notes-file /tmp/release_notes.md
231+
else
232+
echo "Creating new release $VERSION..."
233+
gh release create $VERSION \
234+
--title "Release $VERSION" \
235+
--notes-file /tmp/release_notes.md \
236+
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
237+
fi

0 commit comments

Comments
 (0)