1060 update GitHub actions #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: develop-matrix | ||
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 }} |