github-actions: deploy add fix artifacts

This commit is contained in:
Martin Bubel 2024-01-13 13:28:03 +01:00
parent 2e9d422550
commit 793a5a269d

View file

@ -10,7 +10,37 @@ permissions:
pull-requests: read pull-requests: read
jobs: jobs:
build: build-windows-and-mac:
strategy:
matrix:
os: [windows-latest, macos-latest]
python: ['3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Build lib
run: |
pip install wheel
python setup.py develop
python setup.py bdist_wheel
- name: List contents of dist
run: ls -R dist
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-artifacts
path: dist
build-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: quay.io/pypa/manylinux2014_x86_64 image: quay.io/pypa/manylinux2014_x86_64
@ -56,12 +86,12 @@ jobs:
- name: Archive build artifacts - name: Archive build artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: build-artifacts-none-any name: wheelhouse-artifacts
path: wheelhouse path: wheelhouse
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: [build-linux, build-windows-and-mac]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -79,22 +109,20 @@ jobs:
- name: Download build artifacts for windows and mac wheels - name: Download build artifacts for windows and mac wheels
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: dist path: dist-artifacts
merge-multiple: true merge-multiple: true
- name: Download build artifacts for manylinux wheels - name: Download build artifacts for manylinux wheels
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: wheelhouse path: wheelhouse-artifacts
merge-multiple: true merge-multiple: true
- name: Inspect dist files - name: Inspect dist files
run: | run: ls -R dist
ls -R dist
- name: Inspect wheelhouse files - name: Inspect wheelhouse files
run: | run: ls -R wheelhouse
ls -R wheelhouse
- name: Merge wheel files - name: Merge wheel files
run: | run: |
@ -102,8 +130,7 @@ jobs:
ls -R wheelhouse ls -R wheelhouse
- name: Upload to PyPI using twine - name: Upload to PyPI using twine
run: | run: twine upload --skip-existing wheelhouse/*
twine upload --skip-existing wheelhouse/*
env: env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}