From 0ec144f90d6a3a850308a2970c041614028835b7 Mon Sep 17 00:00:00 2001 From: Marina Kan Date: Wed, 23 Oct 2024 13:52:45 +0100 Subject: [PATCH 1/2] Create publish.yml --- .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..9f81605 --- /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/impc_api + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build package + run: | + python impc_module/setup.py sdist bdist_wheel # Could also be python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 7feb5daabc2647eeb2b5ecba68f2d11a11cb67a0 Mon Sep 17 00:00:00 2001 From: Marina Kan Date: Wed, 23 Oct 2024 13:59:52 +0100 Subject: [PATCH 2/2] Change version number --- impc_module/pyproject.toml | 2 +- impc_module/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/impc_module/pyproject.toml b/impc_module/pyproject.toml index b4e6990..4ad192c 100644 --- a/impc_module/pyproject.toml +++ b/impc_module/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "impc_api" -version = "0.1.0" +version = "1.0.0" description = "A package to facilitate making API requests to the IMPC Solr API" authors = [ { name = "MPI2" }, diff --git a/impc_module/setup.py b/impc_module/setup.py index d684217..1a5d0fb 100644 --- a/impc_module/setup.py +++ b/impc_module/setup.py @@ -3,7 +3,7 @@ setup( name='impc_api', - version='0.1.0', + version='1.0.0', description='A package to facilitate making API request to the IMPC Solr API', author='MPI2, Marina Kan, Diego Pava', url='https://github.com/mpi2/impc-data-api-workshop',