Skip to content

Commit

Permalink
Merge pull request #11 from observingClouds/pypi
Browse files Browse the repository at this point in the history
add ci job for package upload to pypi
  • Loading branch information
observingClouds authored Sep 3, 2022
2 parents 583d6cd + 24c4ad9 commit 95e6924
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish to PyPI

on:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
shell: bash

- name: Install build tools
run: |
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
shell: bash

- name: Build binary wheel
run: python -m build --sdist --wheel . --outdir dist

- name: CheckFiles
run: |
ls dist
shell: bash

- name: Test wheels
run: |
cd dist && python -m pip install pysonde*.whl
python -m twine check *
shell: bash

- name: Publish a Python distribution to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
"pytest-yapf3>=0.4.0",
]

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
# Metadata
name="pysonde",
Expand All @@ -31,6 +28,7 @@
author="Hauke Schulz",
author_email="",
url="https://github.com/observingClouds/pysonde",
long_description="Post-processing tool for atmospheric sounding data",
# Package modules and data
packages=find_packages(),
# Requires
Expand Down

0 comments on commit 95e6924

Please sign in to comment.