Skip to content

docs: update README and DefaultApi.md snippets (#64) #3

docs: update README and DefaultApi.md snippets (#64)

docs: update README and DefaultApi.md snippets (#64) #3

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
release:
name: Create GitHub Release
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
output=$(npx -p semantic-release \
-p @semantic-release/changelog \
-p @semantic-release/git \
-p @semantic-release/github \
-p conventional-changelog-conventionalcommits \
semantic-release 2>&1) && exit_code=0 || exit_code=$?
echo "$output"
if echo "$output" | grep -q "Published release"; then
echo "new_release_published=true" >> "$GITHUB_OUTPUT"
else
echo "new_release_published=false" >> "$GITHUB_OUTPUT"
fi
exit $exit_code
publish:
name: Publish to PyPI
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true