Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

permissions:
id-token: write # required for PyPI trusted publishing

jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
manylinux: auto
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist

macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
path: dist

windows:
runs-on: windows-latest
strategy:
matrix:
target: [x86_64]
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [linux, macos, windows, sdist]
environment:
name: pypi
url: https://pypi.org/project/pkpy/
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist
- uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pkpy"
version = "0.0.36"
version = "0.0.38"
edition = "2021"
description = "Python bindings for pkcore, a high-performance poker analysis library"
license = "GPL-3.0-or-later"
Expand All @@ -11,7 +11,7 @@ crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.28", features = ["extension-module"] }
pkcore = "0.0.37"
pkcore = "0.0.38"

[profile.release]
lto = true
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,25 @@ build-backend = "maturin"
name = "pkpy"
version = "0.1.0"
description = "Python bindings for pkcore, a high-performance poker analysis library"
readme = "README.md"
license = { text = "GPL-3.0-or-later" }
requires-python = ">=3.8"
authors = [
{ name = "folkengine", email = "gaoler@electronicpanopticon.com"},
]
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Games/Entertainment",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
]

[project.urls]
Homepage = "https://github.com/ImperialBower/pkpy"
Repository = "https://github.com/ImperialBower/pkpy"
"Bug Tracker" = "https://github.com/ImperialBower/pkpy/issues"

[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
Expand Down
Loading