Skip to content

bump up version

bump up version #20

name: Publish and Release Python Package
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for trusted publishing to PyPI
contents: write # Required for creating releases and uploading assets
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run Tests
run: poetry run pytest
- name: Build the package
if: success()
run: poetry build
- name: Publish to PyPI
if: success()
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release and Upload Assets
uses: softprops/action-gh-release@v1
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}