Fred Boniface
4137842e4b
Some checks failed
Publish to PyPI and Gitea Package Server / publish-and-sync (push) Failing after 15s
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Publish to PyPI and Gitea Package Server
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish-and-sync:
|
|
runs-on: ubuntu-22.04
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: '3.10.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install setuptools wheel twine
|
|
|
|
- name: Build package
|
|
run: |
|
|
python setup.py sdist bdist_wheel
|
|
|
|
- name: Publish to PyPI
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
run: |
|
|
twine upload dist/*
|
|
|
|
- name: Publish to Gitea
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.GT_PKG_USER }}
|
|
TWINE_PASSWORD: ${{ secrets.GT_PKG_KEY }}
|
|
run: |
|
|
twine upload --repository-url https://git.fjla.uk/api/packages/owlboard/pypi dist/* |