Skip to content

Commit

Permalink
Fix release wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn committed Jan 2, 2024
1 parent afa2d0a commit 0e7a914
Showing 1 changed file with 34 additions and 35 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,48 +59,47 @@ jobs:
path: citiespy/dist

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
working-directory: citiespy
sccache: true
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows
path: citiespy/dist
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
working-directory: citiespy
sccache: true
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows
path: citiespy/dist

release:
name: Release
sdist:
runs-on: ubuntu-latest
needs: [macos, linux, windows]
steps:
- uses: actions/download-artifact@v4
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
pattern: wheels*
path: "target/wheels"

- name: Upload
command: sdist
args: --out dist
working-directory: citiespy
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: "wheels"
path: "target/wheels"
retention-days: 3
name: wheels-sdist
path: citiespy/dist

- name: Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'release' && github.event.action == 'published'
with:
files: |
target/wheels
release:
name: Release
runs-on: ubuntu-latest
needs: [macos, linux, windows, sdist]
steps:
- uses: actions/download-artifact@v4

- name: Publish to PyPI
uses: messense/maturin-action@v1
Expand All @@ -109,4 +108,4 @@ jobs:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *
args: --skip-existing wheels-*/*

0 comments on commit 0e7a914

Please sign in to comment.