diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8e3b4ef --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +--- +name: Publish to PyPI + +on: # yamllint disable-line rule:truthy + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + publish: + name: "Publish to PyPI" + runs-on: "windows-2019" + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: "Set up Python 3.8" + uses: "actions/setup-python@v4" + with: + python-version: "3.8" + + - name: "Install Build Requirements" + run: "pip install -e .[build]" + + - name: "Build source distribution and wheel" + run: "python -m build --sdist --wheel --outdir dist/ ." + + - name: "Publish to PyPI" + uses: "pypa/gh-action-pypi-publish@release/v1" + with: + password: "${{ secrets.PYPI_API_TOKEN }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 722259f..52cb121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This document highlights high-level changes made to this program. + Removed `__future__` imports now that we no longer support Python 2; reorder and fix imports to not use `.` notation. Removed encoding pragma. + Addressed some lint issues; removed Py2 `xrange` hack. ++ Added a `publish` CI workflow. ## 1.1.2 / 2019-10-14 diff --git a/pyproject.toml b/pyproject.toml index 9f828ec..c85649e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ ] dependencies = [ "wxPython>=4.0.0,<4.3", - "numpy>=1.12.1,<1.25", + "numpy>=1.12.1,<2.0", "colour>=0.1.4,<0.2" ] @@ -43,9 +43,14 @@ docs = [ "sphinx==7.1.2", "sphinx_rtd_theme==1.3.0", ] +build = [ + "build==1.0.3", + "setuptools==68.2.2", + "wheel==0.41.3", +] # It seems like this works... Not sure how stable it is though. all = [ - "wafer_map[dev,docs]", + "wafer_map[dev,docs,build]", ] [project.urls]