Skip to content

Commit

Permalink
Added pypi publication workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ge94 committed Apr 25, 2024
1 parent 07361ac commit bf0a002
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[project]
name = "genomeuploader"
version = "2.0.0"
readme = "README.md"
authors = [
{name = "MGnify team", email = "[email protected]"},
Expand All @@ -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"
Expand Down

0 comments on commit bf0a002

Please sign in to comment.