Initial commit: add Gitea PyPI publish workflow
This commit is contained in:
35
.gitea/workflows/publish.yml
Normal file
35
.gitea/workflows/publish.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
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/*
|
||||
Reference in New Issue
Block a user