Skip to content

Commit

Permalink
Add a publish CI workflow that deploys to PyPI on tags (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougthor42 authored Nov 7, 2023
1 parent 26d387d commit 1a41383
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]

Expand All @@ -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]
Expand Down

0 comments on commit 1a41383

Please sign in to comment.