Skip to content

Merge pull request #30 from transferwise/fix_tests #21

Merge pull request #30 from transferwise/fix_tests

Merge pull request #30 from transferwise/fix_tests #21

name: Publish package to pypi
on:
pull_request:
branches: [pypi-publish]
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: python -m pip install --upgrade pip twine build poetry
- name: Poetry single source of truth tag add on
run: poetry self add poetry-version-plugin
- name: Setup virtual environment
run: poetry install
- name: Build distributable package
run: poetry build
- name: Check distributable
run: twine check --strict dist/*.whl
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
password: ${{ secrets.PYPI_API_TOKEN }}