44 lines
969 B
YAML
44 lines
969 B
YAML
name: Publish Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install build twine
|
|
|
|
- name: Build package
|
|
run: |
|
|
python -m build
|
|
|
|
- name: Check package
|
|
run: |
|
|
python -m twine check dist/*
|
|
|
|
- name: Publish to Gitea PyPI registry
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.GITEA_PACKAGE_USER }}
|
|
TWINE_PASSWORD: ${{ secrets.GITEA_PACKAGE_TOKEN }}
|
|
run: |
|
|
python -m twine upload \
|
|
--skip-existing \
|
|
--repository-url https://gitea.joseagrc.com/api/packages/tryton-do/pypi \
|
|
dist/*
|