37 lines
896 B
YAML
37 lines
896 B
YAML
name: Publish to PyPI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Publish-to-PyPI:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name "gitea-actions"
|
|
git config --global user.email "actions@git.jonathanteran.dev"
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v6
|
|
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="${{ secrets.GITEA_TOKEN }}"
|
|
|
|
- name: Build and publish
|
|
run: |
|
|
uv build
|
|
uv publish --token="${{ secrets.PYPI_TOKEN }}" |