4 Commits

Author SHA1 Message Date
zack3d 052eeb447c bruh
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 21s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Has been skipped
Multi-Platform CI / Package for Windows x86_64 (push) Has been skipped
Multi-Platform CI / Create GitHub Release (push) Has been skipped
2025-09-24 00:42:19 -07:00
zack3d 8f4fabd630 Test Incrament
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 19s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Failing after 35s
Multi-Platform CI / Package for Windows x86_64 (push) Failing after 36s
Multi-Platform CI / Create GitHub Release (push) Has been skipped
2025-09-24 00:40:05 -07:00
zack3d e548c13f8c ci(workflows): fix jq selector for AI release notes
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 19s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Successful in 1m11s
Multi-Platform CI / Package for Windows x86_64 (push) Successful in 1m13s
Multi-Platform CI / Create GitHub Release (push) Successful in 16s
Update response path from .choices[0].text to
.output[1].content[0].text to match API response schema and
restore successful notes generation
2025-09-24 00:35:03 -07:00
zack3d cde8b70bd3 ci(workflows): add AI release notes with fallback
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 19s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Successful in 1m13s
Multi-Platform CI / Package for Windows x86_64 (push) Successful in 1m14s
Multi-Platform CI / Create GitHub Release (push) Successful in 18s
- add OPENAI_API_KEY env to release notes step
- attempt AI generation via OpenAI API using git log context
- write release_notes.md on success, otherwise fall back to simple notes
- handle missing API key or API errors gracefully
- update logging to print final release notes without blocking release
2025-09-24 00:19:19 -07:00
2 changed files with 44 additions and 4 deletions
+43 -3
View File
@@ -84,6 +84,8 @@ jobs:
echo "Last tag/commit: $LAST_TAG"
- name: Generate release notes
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
# Get git log since last release
if [ -n "${{ steps.last_tag.outputs.last_tag }}" ]; then
@@ -92,8 +94,32 @@ jobs:
GIT_LOG=$(git log --pretty=format:"- %s (%an)" HEAD~10..HEAD)
fi
# Generate simple release notes
cat > release_notes.md << EOF
# Try to generate AI-powered release notes
if [ -n "$OPENAI_API_KEY" ]; then
echo "Generating AI release notes..."
PROMPT="Generate professional release notes for version ${{ steps.version.outputs.version }} based on these git commits. Focus on user-facing changes and improvements. Use markdown formatting with sections like ## What's New, ## Improvements, ## Bug Fixes. Keep it concise and under 500 words.
Commits:
$GIT_LOG"
RESPONSE=$(curl -s -X POST "https://api.openai.com/v1/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d "{
\"model\": \"gpt-5\",
\"input\": $(echo "$PROMPT" | jq -Rs .)
}")
# Check if the API call was successful and extract the response
if echo "$RESPONSE" | jq -e '.output[1].content[0].text' > /dev/null 2>&1; then
echo "$RESPONSE" | jq -r '.output[1].content[0].text' > release_notes.md
echo "Generated AI release notes successfully"
else
echo "AI generation failed, falling back to simple notes"
echo "API Response: $RESPONSE"
# Fallback to simple notes
cat > release_notes.md << EOF
## Release ${{ steps.version.outputs.version }}
### Changes
@@ -102,8 +128,22 @@ jobs:
---
*Generated automatically from commit history*
EOF
fi
else
echo "No OpenAI API key provided, generating simple release notes"
# Fallback to simple notes
cat > release_notes.md << EOF
## Release ${{ steps.version.outputs.version }}
echo "Generated release notes:"
### Changes
$GIT_LOG
---
*Generated automatically from commit history*
EOF
fi
echo "Final release notes:"
cat release_notes.md
- name: Prepare release assets
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "medicallib_rust"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "MedicalSim core library rewrite in Rust: basic clinical calculations and types."
authors = ["MedicalSim Team"]