28 lines
745 B
YAML
28 lines
745 B
YAML
|
name: Build and Upload Python Package
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- senpai
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Set up Python
|
||
|
uses: actions/setup-python@v2
|
||
|
with:
|
||
|
python-version: '3.x'
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: |
|
||
|
python -m pip install --upgrade pip
|
||
|
pip install setuptools wheel twine build
|
||
|
|
||
|
- name: Build the package
|
||
|
run: python -m build
|
||
|
|
||
|
- name: Upload to Gitea PyPI Registry
|
||
|
run: |
|
||
|
twine upload --repository-url https://gitea.suda.codes/api/packages/sudacode/pypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} dist/*
|