Skip to content

Commit 1f66e5b

Browse files
authored
Merge pull request #59 from alan-turing-institute/57-automatic-pypi-publishing
57 automatic pypi publishing
2 parents 4343976 + 1e93797 commit 1f66e5b

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package to PyPI when a Release is Created
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Publish release to PyPI
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi_release
13+
url: https://pypi.org/p/ModularCirc
14+
permissions:
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel build
26+
- name: Build package
27+
run: |
28+
python -m build
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ there is also a autamtated test pipeline that runs the tests on every push to th
133133
<!-- prettier-ignore-start -->
134134
[actions-badge]: https://github.com/alan-turing-institute/ModularCirc/workflows/CI/badge.svg
135135
[actions-link]: https://github.com/alan-turing-institute/ModularCirc/actions
136-
[pypi-link]: https://test.pypi.org/project/ModularCirc-LevanBokeria/
137-
[pypi-platforms]: https://img.shields.io/pypi/pyversions/ModularCirc-LevanBokeria
138-
[pypi-version]: https://img.shields.io/pypi/v/ModularCirc-LevanBokeria
136+
[pypi-link]: https://pypi.org/project/ModularCirc
137+
[pypi-platforms]: https://img.shields.io/pypi/pyversions/ModularCirc
138+
[pypi-version]: https://img.shields.io/pypi/v/ModularCirc
139139
<!-- prettier-ignore-end -->

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ModularCirc"
7-
version = "0.1.2"
7+
version = "0.1.3"
88
authors = [
99
{name = "Maximilian Balmus", email = "mbalmus@turing.ac.uk"}
1010
]

0 commit comments

Comments
 (0)