Skip to content

Commit 392c9fa

Browse files
authored
Merge pull request #57 from moderation-api/speakeasy/regenerate
feat: v2.1.0, API changes
2 parents 0139fe0 + b3acd17 commit 392c9fa

102 files changed

Lines changed: 16116 additions & 648 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/publish-pypi.yml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Maintained in moderation-api/sdk-generator (custom/python). Edits here are overwritten.
22
# Every push to main whose package version has no release tag yet publishes
3-
# that version and creates the GitHub release (notes: .github/release-notes/vX.Y.Z.md
4-
# if present, otherwise generated from the merged pull requests).
3+
# that version and creates the GitHub release (notes: the CHANGELOG.md entry).
54
name: Publish PyPI
65
on:
76
push:
@@ -43,8 +42,14 @@ jobs:
4342
env:
4443
GH_TOKEN: ${{ github.token }}
4544
run: |
46-
notes=".github/release-notes/v${VERSION}.md"
47-
if [ -f "$notes" ]; then
45+
# Notes: the CHANGELOG.md entry of this version, then the release notes file,
46+
# then the merged pull requests.
47+
notes="$RUNNER_TEMP/notes.md"
48+
awk -v v="$VERSION" 'index($0, "## " v " (") == 1 {f = 1; next} f && /^## / {exit} f' CHANGELOG.md > "$notes" || true
49+
if [ ! -s "$notes" ] && [ -f ".github/release-notes/v${VERSION}.md" ]; then
50+
cp ".github/release-notes/v${VERSION}.md" "$notes"
51+
fi
52+
if [ -s "$notes" ]; then
4853
gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --notes-file "$notes"
4954
else
5055
gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --generate-notes

‎.speakeasy/gen.lock‎

Lines changed: 106 additions & 92 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ generation:
3232
generateNewTests: true
3333
skipResponseBodyAssertions: false
3434
python:
35-
version: 2.0.0
35+
version: 2.1.0
3636
additionalDependencies:
3737
dev: {}
3838
main: {}

0 commit comments

Comments
 (0)