Skip to content

V2.1.2 Release of openapi-python-generator #37

V2.1.2 Release of openapi-python-generator

V2.1.2 Release of openapi-python-generator #37

Workflow file for this run

# .github/workflows/release.yml
name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.release.target_commitish }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: 🐍 Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
architecture: x64
- name: πŸ“¦ Install Poetry
run: pip install poetry==1.3.1
- name: πŸ”§ Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: πŸš€ Bump version, commit, and push
run: |
poetry version ${{ github.ref_name }}
git add pyproject.toml
git commit -m "chore(release): version ${{ github.ref_name }}"
git tag -f ${{ github.ref_name }} HEAD
git push origin ${{ github.event.release.target_commitish }}
git push -f origin refs/tags/${{ github.ref_name }}
- name: πŸ“¦ Build package
run: poetry build
- name: πŸš€ Publish to PyPI
run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}