Skip to content

Commit 367b995

Browse files
Javier Vegas-Regidorbouweandela
andauthored
Add publication to PyPI (#22)
Co-authored-by: Bouwe Andela <[email protected]>
1 parent abbcfd0 commit 367b995

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: PyPi Build and Deploy 🐍📦
2+
3+
on:
4+
release:
5+
types: [published]
6+
# use this for testing
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build-n-publish:
13+
name: Build and publish ESMValTool_sample_data on PyPi
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.9
21+
- name: Install pep517
22+
run: >-
23+
python -m
24+
pip install
25+
pep517
26+
--user
27+
- name: Build a binary wheel and a source tarball
28+
run: >-
29+
python -m
30+
pep517.build
31+
--source
32+
--binary
33+
--out-dir dist/
34+
.
35+
# - name: Publish distribution 📦 to Test PyPI
36+
# uses: pypa/gh-action-pypi-publish@master
37+
# with:
38+
# password: ${{ secrets.test_pypi_password }}
39+
# repository_url: https://test.pypi.org/legacy/
40+
- name: Publish distribution 📦 to PyPI
41+
if: startsWith(github.ref, 'refs/tags')
42+
uses: pypa/gh-action-pypi-publish@master
43+
with:
44+
password: ${{ secrets.pypi_password }}

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools >= 40.6.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
]
99

1010
setup(
11-
name='ESMValTool sample data',
11+
name='ESMValTool_sample_data',
1212
version='0.0.3',
1313
description="ESMValTool sample data",
14-
long_description=readme + '\n\n',
14+
long_description=readme,
15+
long_description_content_type='text/markdown',
1516
author="Stef Smeets, Bouwe Andela",
1617
url='https://github.com/ESMValGroup/ESMValTool_sample_data',
1718
packages=PACKAGES,
@@ -24,7 +25,7 @@
2425
'Intended Audience :: Developers',
2526
'Intended Audience :: Science/Research',
2627
'License :: OSI Approved :: Apache Software License',
27-
'License :: Other/Proprietary License'
28+
'License :: Other/Proprietary License',
2829
'Natural Language :: English',
2930
'Programming Language :: Python :: 3',
3031
'Programming Language :: Python :: 3.6',

0 commit comments

Comments
 (0)