2022-07-20 13:31:43 +00:00
|
|
|
name: cd
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tagged-release:
|
|
|
|
name: Tagged Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-19 10:55:30 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-20 13:31:43 +00:00
|
|
|
- name: Set up Python
|
2023-09-19 10:55:30 +00:00
|
|
|
uses: actions/setup-python@v4
|
2022-07-20 13:31:43 +00:00
|
|
|
with:
|
2023-12-06 15:29:59 +00:00
|
|
|
python-version: "3.12"
|
2022-07-20 13:31:43 +00:00
|
|
|
- name: Install Poetry
|
2023-09-19 10:55:30 +00:00
|
|
|
uses: abatilo/actions-poetry@v2
|
2022-07-20 13:31:43 +00:00
|
|
|
with:
|
2023-11-08 23:07:04 +00:00
|
|
|
poetry-version: 1.6.1
|
|
|
|
- name: Install project
|
|
|
|
run: poetry install --only main
|
|
|
|
- name: Build project
|
2022-07-20 13:31:43 +00:00
|
|
|
run: poetry build
|
|
|
|
- name: Upload wheel
|
2023-09-19 10:55:30 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-20 13:31:43 +00:00
|
|
|
with:
|
|
|
|
name: Python Wheel
|
|
|
|
path: "dist/*.whl"
|
|
|
|
- name: Deploy release
|
|
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
|
|
with:
|
|
|
|
prerelease: false
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
files: |
|
|
|
|
dist/*.whl
|
|
|
|
- name: Publish to PyPI
|
|
|
|
env:
|
|
|
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
|
|
|
|
run: poetry publish
|