GPy/.github/workflows/deploy.yml
2024-01-13 10:02:19 +01:00

64 lines
1.3 KiB
YAML

name: "Deploy Python Lib"
on:
release:
types:
- created
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
build:
runs-on: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build wheel files
run: |
python3.9 setup.py bdist_wheel
- name: List contents of dist
run: ls dist
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-none-any
path: dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install twine
run: |
pip install --upgrade pip
pip install twine
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Inspect dist files
run: |
ls -R dist
- name: Upload to PyPI using twine
run: |
twine upload --skip-existing dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}