Skip to content

Commit

Permalink
Merge pull request #74 from lsst/tickets/DM-35047
Browse files Browse the repository at this point in the history
DM-35047: Add upload to pypi
  • Loading branch information
mwittgen committed Jun 10, 2022
2 parents 8061f95 + f248990 commit a31d6b5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "*"
pull_request:

jobs:
Expand Down Expand Up @@ -47,3 +49,38 @@ jobs:
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml

pypi:

runs-on: ubuntu-latest
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v3
with:
# Need to clone everything to embed the version.
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "setup.cfg"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel build
- name: Build and create distribution
run: |
pip install -v -e .
python -m build --sdist --wheel
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOADS }}
16 changes: 13 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
[metadata]
name = pex_config
name = lsst-pex-config
description = A flexible configuration system using Python files.
author = Rubin Observatory Data Management
author_email = dm-admin@lists.lsst.org
url = https://github.com/lsst/pex_config
license = GPLv3+ License, BSD 3-Clause License
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
License :: OSI Approved :: BSD License
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.rst
long_description_content_type = text/x-rst

license_files = LICENSE, gpl-v3.0.txt, bsd_license.txt

keywords =
lsst

[options]
zip_safe = True
package_dir=
Expand Down

0 comments on commit a31d6b5

Please sign in to comment.