Skip to content

Commit 3726392

Browse files
Add pypi job
1 parent 24c590e commit 3726392

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/CD.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@ on:
66
- '*'
77

88
jobs:
9+
pypi:
10+
name: build and deploy to PyPI
11+
if: github.repository == 'ACCESS-NRI/yamanifest' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
12+
runs-on: "ubuntu-latest"
13+
permissions:
14+
id-token: write
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/[email protected]
19+
20+
- name: Set up Python 3.11
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.11
24+
25+
- name: Install build dependencies
26+
run: python -m pip install build twine
27+
28+
- name: Build distributions
29+
shell: bash -l {0}
30+
run: |
31+
git clean -xdf
32+
pyproject-build
33+
34+
- name: Publish package to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
937

1038
conda:
1139
name: Build with conda and upload

0 commit comments

Comments
 (0)