Skip to content

Commit c7c0ffd

Browse files
authored
🎨 add dynamic versioning of python pkg (#50)
* 🎨 add dynamic versioning of python pkg * ⚡ do not save docs * ⚡ automate publishing of Python package
1 parent 58918dd commit c7c0ffd

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.github/workflows/cdci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,26 @@ jobs:
9595
cd docs
9696
vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt jupyter
9797
vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt jupyter
98+
99+
publish:
100+
name: Publish package to PyPI
101+
if: startsWith(github.ref, 'refs/tags')
102+
permissions:
103+
id-token: write
104+
needs:
105+
- test
106+
- other-reports
107+
runs-on: ubuntu-latest
108+
109+
steps:
110+
- uses: actions/checkout@v4
111+
112+
- uses: actions/setup-python@v5
113+
with:
114+
python-version: "3.11"
115+
- name: Install twine and build
116+
run: python -m pip install --upgrade twine build
117+
- name: Build
118+
run: python -m build
119+
- name: Publish package distributions to PyPI
120+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
[tool.poetry]
1+
[project]
22
name = "vuegen"
3-
version = "0.1.0"
3+
dynamic = ["version"]
4+
5+
[tool.poetry]
46
description = "Module to generate automatic web interface reports with visualizations"
57
authors = ["MoNA group"]
68
license = "MIT"
79
readme = "README.md"
810
repository = "https://github.com/Multiomics-Analytics-Group/vuegen"
11+
version = "0.1.0"
912

1013
[tool.poetry.dependencies]
1114
python = ">=3.9,<3.9.7 || >3.9.7,<4.0"
@@ -39,9 +42,16 @@ quarto-cli = "*"
3942
[tool.poetry.group.dev.dependencies]
4043
ipykernel = {version="^6.29.5", optional=true}
4144

45+
[tool.poetry.requires-plugins]
46+
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
47+
48+
49+
[tool.poetry-dynamic-versioning]
50+
enable = true
51+
4252
[build-system]
43-
requires = ["poetry-core"]
44-
build-backend = "poetry.core.masonry.api"
53+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
54+
build-backend = "poetry_dynamic_versioning.backend"
4555

4656
# https://stackoverflow.com/a/60990574/9684872
4757
[tool.poetry.extras]

0 commit comments

Comments
 (0)