Skip to content

Commit

Permalink
Merge pull request #45 from callumrollo/callum-patch-2
Browse files Browse the repository at this point in the history
add gh action to pulish to pypi
  • Loading branch information
callumrollo committed Aug 10, 2021
2 parents 4414dee + 254bc6e commit 5b5fa12
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish to PyPI

on:
release:
types:
- published

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

- name: Set up Python
uses: actions/setup-python@v1
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 version
run: |
if [[ $(python setup.py --version) == "0.0.0" ]]; then
exit 1
fi
shell: bash
- name: Test wheels
run: |
cd dist && python -m pip install gliderpy*.whl
python -m twine check *
shell: bash

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[metadata]
name = gliderpy
description = Glider Data Fetcher
author = Filipe Fernandes
author_email = ocefpaf@gmail.com.COM
author = Callum Rollo, Filipe Fernandes, Lindsay Abrams
author_email = c.rollo@outlook.com
url = https://github.com/ioos/gliderpy
long_description = file: README.md
long_description_content_type = text/markdown
license = BSD-3-Clause
license_file = LICENSE.txt
classifiers =
Development Status :: 5 - Production/Stable
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
Operating System :: OS Independent
License :: OSI Approved :: BSD License
Expand Down

0 comments on commit 5b5fa12

Please sign in to comment.