35 lines
721 B
YAML
35 lines
721 B
YAML
name: Publish to PyPI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Publish-to-PyPI:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 10
|
|
|
|
- name: Show git log
|
|
run: |
|
|
git log --oneline --graph -10
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: ".python-version"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.3.2
|
|
|
|
- name: Bump version
|
|
run: |
|
|
uv run git-flow tag --token=$GITEA_TOKEN
|
|
|
|
- name: Build and publish
|
|
run: |
|
|
uv build
|
|
uv publish --token=$PYPI_TOKEN |