36 lines
807 B
YAML
36 lines
807 B
YAML
name: Publish to Gitea PyPI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install build tools
|
|
run: pip install --upgrade build twine
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Publish to Gitea PyPI
|
|
env:
|
|
TWINE_REPOSITORY_URL: https://git.scorpi.us/api/packages/${{ github.repository_owner }}/pypi
|
|
TWINE_USERNAME: ${{ github.repository_owner }}
|
|
TWINE_PASSWORD: ${{ secrets.GITEA_TOKEN }}
|
|
run: twine upload dist/*
|