Skip to content

Release

Release #22

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Release
# Controls when the workflow will run
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/checkout@master
- name: Install poetry
run: pip install poetry
- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true
- name: Update version
shell: bash
run: |
poetry version minor
VERSION="$(poetry version -s)"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
git tag "v${VERSION}"
- name: Publish to PyPI
shell: bash
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config http-basic.pypi "__token__" "$POETRY_PYPI_TOKEN_PYPI"
poetry publish --build
- name: Commit & Push changes
uses: Andro999b/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: pyproject.toml
message: 'bump version to ${env.VERSION}'
tags: True
- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
name: "v${{ env.VERSION }}"
tag: "v${{ env.VERSION }}"
token: ${{ secrets.GITHUB_TOKEN }}