diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9aa1709 --- /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_release + 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 build + - name: Build package + run: | + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 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 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"} ]