Skip to content

Commit

Permalink
fix(build): Python release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Dygalo <[email protected]>
  • Loading branch information
Stranger6667 committed Sep 11, 2024
1 parent bacf5fb commit 6b0a211
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -40,9 +40,9 @@ jobs:
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.tar.gz --force-reinstall
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: sdist
path: dist

macos-x86_64:
Expand Down Expand Up @@ -71,9 +71,9 @@ jobs:
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-macos-x86_64-py${{ matrix.python-version }}
path: dist

macos-universal:
Expand Down Expand Up @@ -101,9 +101,9 @@ jobs:
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-macos-universal-py${{ matrix.python-version }}
path: dist

windows:
Expand Down Expand Up @@ -134,13 +134,13 @@ jobs:
run: |
python -m pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-windows-${{ matrix.target }}-py${{ matrix.python-version }}
path: dist

linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
Expand Down Expand Up @@ -180,14 +180,14 @@ jobs:
venv/bin/pip install -U pip wheel
venv/bin/pip install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-linux-${{ matrix.target }}-py${{ matrix.python-version }}
path: dist

release:
name: Release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- sdist
- macos-x86_64
Expand All @@ -196,10 +196,13 @@ jobs:
- linux
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
path: all
- name: Merge files
run: |
mkdir dist
mv all/*/* dist
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit 6b0a211

Please sign in to comment.