Skip to content

Commit e8f9908

Browse files
committed
⚡ automate publishing of Python package
1 parent ecde8ba commit e8f9908

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
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

0 commit comments

Comments
 (0)