Browse Source

feat(ci): auto-create GitHub releases on version bump

Releases now appear in the GitHub sidebar. The release notes are
extracted from CHANGELOG.md for the specific version.
darrenhinde 4 months ago
parent
commit
c3385b9d8d
1 changed files with 20 additions and 0 deletions
  1. 20 0
      .github/workflows/test-agents.yml

+ 20 - 0
.github/workflows/test-agents.yml

@@ -252,3 +252,23 @@ jobs:
           git push origin main --tags
           git push origin main --tags
         env:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      
+      - name: Create GitHub Release
+        run: |
+          NEW_VERSION=$(cat VERSION)
+          
+          # Extract changelog entry for this version
+          RELEASE_NOTES=$(awk '/^## \['"$NEW_VERSION"'\]/{flag=1; next} /^## \[/{flag=0} flag' CHANGELOG.md)
+          
+          # If no specific notes found, use commit message
+          if [ -z "$RELEASE_NOTES" ]; then
+            RELEASE_NOTES="Release v$NEW_VERSION"
+          fi
+          
+          # Create the release
+          gh release create "v$NEW_VERSION" \
+            --title "v$NEW_VERSION" \
+            --notes "$RELEASE_NOTES" \
+            --latest
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}