diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..cc54cab --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,51 @@ +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: path: dist/ + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/mgnify-pipelines-toolkit + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 546964f..d1cee9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [project] name = "genomeuploader" +version = "2.0.0" readme = "README.md" authors = [ {name = "MGnify team", email = "metagenomics-help@ebi.ac.uk"}, @@ -23,9 +24,14 @@ classifiers = [ dependencies = [ "requests==2.26.0", "pandas==1.4.1", - "python-dotenv==1.0.1" + "python-dotenv==1.0.1", + "ena-webin-cli" ] +[project.urls] +Homepage = "https://github.com/EBI-Metagenomics/genome_uploader" +Issues = "https://github.com/EBI-Metagenomics/genome_uploader/issues" + [tool.pytest.ini_options] minversion = "6.0" addopts = "-ra -q"