V2.1.2 Release of openapi-python-generator #37
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .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 }} |