Skip to content

Commit

Permalink
MNT: Auto publish to PyPI
Browse files Browse the repository at this point in the history
Add long_description_content_type
  • Loading branch information
pllim committed Jan 22, 2021
1 parent d4e69db commit baf7e37
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
if: github.repository == 'astropy/astrowidgets'

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install python-build and twine
run: python -m pip install build "twine>=3.3"

- name: Build package
run: python -m build --sdist --wheel .

- name: List result
run: ls -l dist

- name: Check dist
run: python -m twine check --strict dist/*

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exclude = setup_package.py,conftest.py,__init__.py
name = astrowidgets
description = Widgets for the Jupyter notebook and JupyterLab
long_description = file: README.rst
long_description_content_type = text/x-rst
author = Astropy Developers
author_email = mattwcraig@gmail.com
license = BSD 3-Clause
Expand Down

0 comments on commit baf7e37

Please sign in to comment.