Skip to content

Commit

Permalink
Add GitHub Action for publishing Python packages to PyPI (#5)
Browse files Browse the repository at this point in the history
* Add publish PyPI github action

* Bump version to 1.0.0

* Update long_description attribute to use README.md file
  • Loading branch information
lorenzo-delsignore authored Sep 3, 2024
1 parent 989bca3 commit d094ab1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish
on:
push:
tags:
- 'v*'

jobs:
publish-tag:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 0 additions & 3 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ jobs:
run: tox -c tox.ini -e check-formatting,lint
- name: Run Test Suite
run: tox -c tox.ini -e py312



8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "micrograd"
version = "0.0.1"
description = "Backprogation from scratch"
version = "1.0.0"
description = "Backpropagation from scratch"
keywords = []
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -24,7 +24,8 @@ author_email = "[email protected]"
maintainer = "Lorenzo Del Signore"
maintainer_email = "[email protected]"
url = "https://github.com/lorenzo-delsignore/micrograd"
long_description = "Backprogation from scratch"
long_description = { file = "README.md" }
long_description_content_type = "text/markdown"
license = { file = "LICENSE" }

[tool.setuptools.packages.find]
Expand Down Expand Up @@ -62,4 +63,3 @@ requires = [
"setuptools==69.5.1",
"wheel",
]

0 comments on commit d094ab1

Please sign in to comment.