From c4703a7b2a50441b748eac077ba78fc5a9e48562 Mon Sep 17 00:00:00 2001 From: Levan Bokeria Date: Thu, 10 Apr 2025 09:31:27 +0100 Subject: [PATCH 1/5] adding automatic publishing yml file --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ffd498b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Upload Python Package to PyPI when a Release is Created + +on: + release: + types: [created] + +jobs: + pypi-publish: + name: Publish release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ModularCirc + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build package + run: | + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 4b966ac237dd3627805af76f6db9c21599d04b6a Mon Sep 17 00:00:00 2001 From: Levan Bokeria Date: Thu, 10 Apr 2025 09:37:36 +0100 Subject: [PATCH 2/5] env name change --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ffd498b..8d54c43 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: name: Publish release to PyPI runs-on: ubuntu-latest environment: - name: pypi + name: pypi_release url: https://pypi.org/p/ModularCirc permissions: id-token: write From 852f38cebf4d5a82527b2c0140ea14bb8beec5e8 Mon Sep 17 00:00:00 2001 From: Levan Bokeria Date: Thu, 10 Apr 2025 09:43:49 +0100 Subject: [PATCH 3/5] Update README.md fixing readme badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1882c08..7468a87 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ there is also a autamtated test pipeline that runs the tests on every push to th [actions-badge]: https://github.com/alan-turing-institute/ModularCirc/workflows/CI/badge.svg [actions-link]: https://github.com/alan-turing-institute/ModularCirc/actions -[pypi-link]: https://test.pypi.org/project/ModularCirc-LevanBokeria/ -[pypi-platforms]: https://img.shields.io/pypi/pyversions/ModularCirc-LevanBokeria -[pypi-version]: https://img.shields.io/pypi/v/ModularCirc-LevanBokeria +[pypi-link]: https://pypi.org/project/ModularCirc +[pypi-platforms]: https://img.shields.io/pypi/pyversions/ModularCirc +[pypi-version]: https://img.shields.io/pypi/v/ModularCirc From 096881fed693c93432b1dac8ae5493013560db09 Mon Sep 17 00:00:00 2001 From: Levan Bokeria Date: Thu, 10 Apr 2025 09:50:47 +0100 Subject: [PATCH 4/5] updating the release number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8ab07f2..aa7d195 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ModularCirc" -version = "0.1.2" +version = "0.1.3" authors = [ {name = "Maximilian Balmus", email = "mbalmus@turing.ac.uk"} ] From 1e93797166eabb6fb28e4b8b53428c0862b32766 Mon Sep 17 00:00:00 2001 From: Levan Bokeria Date: Thu, 10 Apr 2025 09:52:33 +0100 Subject: [PATCH 5/5] Update publish.yml adding build to the publishing.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d54c43..9aa1709 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel + pip install setuptools wheel build - name: Build package run: | python -m build