Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 9 additions & 4 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Maintained in moderation-api/sdk-generator (custom/python). Edits here are overwritten.
# Every push to main whose package version has no release tag yet publishes
# that version and creates the GitHub release (notes: .github/release-notes/vX.Y.Z.md
# if present, otherwise generated from the merged pull requests).
# that version and creates the GitHub release (notes: the CHANGELOG.md entry).
name: Publish PyPI
on:
push:
Expand Down Expand Up @@ -43,8 +42,14 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
notes=".github/release-notes/v${VERSION}.md"
if [ -f "$notes" ]; then
# Notes: the CHANGELOG.md entry of this version, then the release notes file,
# then the merged pull requests.
notes="$RUNNER_TEMP/notes.md"
awk -v v="$VERSION" 'index($0, "## " v " (") == 1 {f = 1; next} f && /^## / {exit} f' CHANGELOG.md > "$notes" || true
if [ ! -s "$notes" ] && [ -f ".github/release-notes/v${VERSION}.md" ]; then
cp ".github/release-notes/v${VERSION}.md" "$notes"
fi
if [ -s "$notes" ]; then
gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --notes-file "$notes"
else
gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --generate-notes
Expand Down
198 changes: 106 additions & 92 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: false
python:
version: 2.0.0
version: 2.1.0
additionalDependencies:
dev: {}
main: {}
Expand Down
Loading
Loading