parent
ca19c7edac
commit
49a4c68be2
32
.gitea/workflows/build-pypi.yml
Normal file
32
.gitea/workflows/build-pypi.yml
Normal file
@ -0,0 +1,32 @@
|
||||
name: Build and Upload Python Package
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
cache: pip
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build twine
|
||||
|
||||
- name: Build the package
|
||||
run: python -m build
|
||||
|
||||
- name: Publish to Custom PyPI Registry
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||
run: |
|
||||
twine upload --repository-url https://gitea.suda.codes/api/packages/sudacode/pypi dist/*
|
Loading…
x
Reference in New Issue
Block a user