Skip to content

Commit

Permalink
workflow: Publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
monochromatti committed Nov 4, 2024
1 parent 8244cdb commit 1d09a8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,6 @@ on:
- '*'

jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Test with pytest
run: pytest --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}

linux:
name: Build wheels for Linux
runs-on: ${{ matrix.platform.runner }}
Expand Down Expand Up @@ -180,7 +155,7 @@ jobs:
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs: [windows, macos] # [linux, musllinux, windows, macos]
needs: [linux, musllinux, windows, macos]
runs-on: ubuntu-latest
environment:
name: release
Expand All @@ -194,5 +169,7 @@ jobs:
path: dist
- name: Move wheels to dist
run: find dist/ -type f -name "*.whl" -exec mv {} dist/ \; && find dist/ -type d -empty -delete
# - name: Publish distribution 📦 to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Show all files recursively
run: ls -R .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
name = "polars-splines"
description = "A polars expression plugin for splines"
readme = "README.md"
requires-python = ">=3.10"
authors = [{ name = "Mattias Matthiesen", email = "mattmatthi@gmail.com" }]
license = { file = "LICENSE" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
keywords = ["splines", "interpolation", "polars"]
dynamic = ["version"]
version = "0.1.0"
requires-python = ">=3.10"
dependencies = ["polars>=1.7,<2"]

[tool.maturin]
Expand Down

0 comments on commit 1d09a8a

Please sign in to comment.