Skip to content

Fix Github workflows #290

Fix Github workflows

Fix Github workflows #290

name: Upload Python Package to Test PyPI
on:
workflow_dispatch:
pull_request:
jobs:
build_wheels:
name: Build wheels using ${{matrix.python-version}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Build Wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/*.whl
overwrite: true
compression-level: 9
build_sdist:
name: Build Source Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifact*
merge-multiple: true
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TEST_API_JPMC_OSS }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true