32 lines
697 B
YAML
32 lines
697 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
packaging:
|
|
name: Distribution
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.9
|
|
- name: Install poetry
|
|
run: python -m pip install poetry
|
|
- name: Build package
|
|
run: poetry build
|
|
- name: Publish package to PyPI
|
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
env:
|
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi }}
|
|
run: poetry publish -n
|