37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: Publish Package to Gitea
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*" # This triggers the workflow when you push a tag like v1.0.0
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest # Or your specific runner label
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install build twine
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Publish to Gitea PyPI
|
|
env:
|
|
# These secrets must match the names you created in Gitea
|
|
TWINE_USERNAME: ${{ secrets.TWINE_PASSWORD }}
|
|
TWINE_PASSWORD: ${{ secrets.TWINE_USERNAME }}
|
|
# REPLACE THIS URL with your actual Gitea PyPI endpoint
|
|
TWINE_REPOSITORY_URL: "https://gitea.schneiderserver.site/api/packages/mathias2784/pypi"
|
|
run: |
|
|
twine upload --repository-url $TWINE_REPOSITORY_URL dist/*
|