-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from pjflux2001/main
CI workflow for python release
- Loading branch information
Showing
2 changed files
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Check if Python package already exists | ||
run: | | ||
pip install polyphy-testing==$(cat pyproject.toml | head -20 | tail -1 | cut -d '"' -f 2) && echo "true" > ./flag || echo "false" > ./flag | ||
- name: Build and publish package | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
run: | | ||
if grep -qF false ./flag; then | ||
python3 -m pip install --upgrade build | ||
python3 -m build | ||
python3 -m pip install --upgrade twine | ||
python3 -m twine upload dist/* | ||
echo "New version is live!!!" | ||
else | ||
echo "Not publishing as the above version already exists!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,50 @@ | ||
[project] | ||
name = "polyphy-testing" | ||
version = "0.0.1" | ||
description = "description for polyphy testing" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = {file = "LICENSE"} | ||
keywords = ["polyphy"] | ||
authors = [ | ||
{name = "author_name", email = "[email protected]" } | ||
] | ||
maintainers = [ | ||
{name = "maintainers_name", email = "[email protected]" } | ||
] | ||
|
||
[build-system] | ||
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD! | ||
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
# For smarter version schemes and other configuration options, | ||
# check out https://github.com/pypa/setuptools_scm | ||
version_scheme = "no-guess-dev" | ||
|
||
[tool.poetry.dependencies] | ||
Sphinx = "4.5.0" | ||
coverage = "*" | ||
flake8 = "*" | ||
isort = "*" | ||
matplotlib = "3.5.3" | ||
nbmake = "*" | ||
numpy = "<=1.22.0" | ||
pytest-cov = "*" | ||
pytest-xdist = "*" | ||
pytest = "7.1.2" | ||
scipy = "*" | ||
setuptools = "65.5.1" | ||
sphinx = "*" | ||
taichi = "1.6.0" | ||
toml = "*" | ||
tox = "*" | ||
yapf = "*" | ||
ipywidgets = "*" | ||
pyvista = "*" | ||
trimesh = "*" | ||
PyMCubes = "*" | ||
scikit-image = "*" | ||
path = "*" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[tool.poetry.extras] |