Skip to content

Fix: remove transaction wrap (#5) #8

Fix: remove transaction wrap (#5)

Fix: remove transaction wrap (#5) #8

Workflow file for this run

# This CD script builds and pushes the package to code artifact
name: Publish PyPI Package
on:
push:
tags: v**
env:
POETRY_VERSION: 1.2
DEFAULT_PYTHON_VERSION: "3.10"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
pipx install poetry==${{ env.POETRY_VERSION }}
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
cache: "poetry"
- name: Install Dependencies
run: poetry install --sync
- id: build
name: Build package 🔧
run: poetry build
- id: upload
name: Publish a Python distribution to PyPI 📦
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create release 🔔
if: steps.upload.outcome == 'success'
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}