Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,21 @@ jobs:
echo "$FORMATTED_CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Create or Update Release
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.create_tag.outputs.new_tag }}
run: |
DEB_VERSION=$(echo $VERSION | sed 's/^v//')

# Always delete existing release first (handles re-runs)
if gh release view $VERSION &>/dev/null; then
echo "Deleting existing release $VERSION..."
gh release delete $VERSION --yes --cleanup-tag=false
echo "Waiting for GitHub to process deletion..."
sleep 10
fi

cat > /tmp/release_notes.md << 'NOTES'
${{ steps.changelog.outputs.changelog }}

Expand Down Expand Up @@ -221,17 +229,8 @@ jobs:
```
NOTES

# Check if release already exists
if gh release view $VERSION &>/dev/null; then
echo "Release $VERSION exists, updating assets with --clobber..."
gh release upload $VERSION --clobber \
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
# Update release notes
gh release edit $VERSION --notes-file /tmp/release_notes.md
else
echo "Creating new release $VERSION..."
gh release create $VERSION \
--title "Release $VERSION" \
--notes-file /tmp/release_notes.md \
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
fi
echo "Creating release $VERSION..."
gh release create $VERSION \
--title "Release $VERSION" \
--notes-file /tmp/release_notes.md \
dist/sekai-cli-* dist/*.deb dist/checksums.txt dist/*.sig
Loading