2023-02-06 02:33:09 +00:00
|
|
|
name: cd
|
2023-05-03 02:05:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: "write"
|
|
|
|
id-token: "write"
|
|
|
|
packages: "write"
|
|
|
|
pull-requests: "read"
|
2023-02-06 02:33:09 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tagged-release:
|
|
|
|
name: Tagged Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.10.x'
|
|
|
|
- name: Install Poetry
|
2023-05-03 02:05:11 +00:00
|
|
|
uses: abatilo/actions-poetry@v2.3.0
|
2023-02-06 02:33:09 +00:00
|
|
|
with:
|
2023-05-03 02:05:11 +00:00
|
|
|
poetry-version: '1.4.2'
|
2023-02-06 02:33:09 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: poetry install
|
2023-05-03 02:05:11 +00:00
|
|
|
- name: Build project
|
|
|
|
run: poetry build
|
2023-02-06 02:33:09 +00:00
|
|
|
- name: Upload wheel
|
2023-05-03 02:05:11 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-02-06 02:33:09 +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
|