add build script
Some checks failed
Build and Upload Python Package / build (push) Failing after 7m29s
Some checks failed
Build and Upload Python Package / build (push) Failing after 7m29s
This commit is contained in:
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/*
|
||||||
Reference in New Issue
Block a user