Skip to content

Commit 6473e13

Browse files
committed
add pypi release tools
1 parent 0ce47fd commit 6473e13

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.github/workflows/release.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PyPI Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install setuptools wheel
25+
26+
- name: Build the package
27+
run: |
28+
python setup.py sdist bdist_wheel
29+
30+
- name: Upload to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
password: ${{ secrets.PYPI_TOKEN }}

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ __pycache__
1111
best_model_old_arch/
1212
multirun/
1313
*.nc
14-
xsarml.ipynb
14+
xsarml.ipynb
15+
build/
16+
dist/
17+
l2winddir.egg-info/

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
description='A package for l2 wind direction',
77
author='jean2262',
88
author_email='[email protected]',
9+
long_description=open("README.md").read(),
10+
long_description_content_type="text/markdown",
911
packages=find_packages(),
1012
install_requires=[
1113
'hydra-core',

0 commit comments

Comments
 (0)