Skip to content

Commit

Permalink
add workflow to build pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
daveey committed Aug 7, 2024
1 parent 0bf63f8 commit ddedc30
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Publish

on:
push:
tags:
- 'v*.*.*' # Trigger on version tags

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9, 3.10, 3.11]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel==2.3.0
- name: Build wheels
run: |
cibuildwheel --output-dir wheelhouse
- name: Upload wheels to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload wheelhouse/*
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include README.md
include LICENSE
recursive-include puffergrid *.pyx *.pxd *.py
recursive-include examples *.pyx *.pxd *.py
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,21 @@ def build_ext(srcs, package="puffergrid"):
},
annotate=True,
),
description='A framework for fast grid-based environments',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='David Bloomin',
author_email='[email protected]',
url='https://github.com/daveey/puffergrid',
install_requires=[
"numpy",
"cython",
'numpy',
'cython',
'tqdm',
],
gdb_debug=True,
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)

0 comments on commit ddedc30

Please sign in to comment.