Skip to content

Commit

Permalink
Merge pull request #17 from mpi2/autopublish
Browse files Browse the repository at this point in the history
Set up publishing `impc_api` package from GitHub
  • Loading branch information
marinak-ebi authored Oct 23, 2024
2 parents dc22114 + 7feb5da commit 30cb7d3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion impc_module/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
2 changes: 1 addition & 1 deletion impc_module/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 30cb7d3

Please sign in to comment.