Skip to content

Commit

Permalink
Add upload to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Jun 10, 2022
1 parent 894b03d commit ffbb64a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
36 changes: 36 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 @@ -80,3 +82,37 @@ 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: |
python -m build --sdist --wheel
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOADS }}
14 changes: 12 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
[metadata]
name = lsst_utils
name = lsst-utils
description = Utility functions from Rubin Observatory Data Management for the Legacy Survey of Space and Time (LSST).
author = Rubin Observatory Data Management
author_email = dm-admin@lists.lsst.org
url = https://github.com/lsst/utils
license = BSD 3-Clause License
classifiers =
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
readme = file: README.rst
long_description = file: README.rst
long_description_content_type = text/x-rst

keywords =
lsst

[options]
# zip_safe can't be used for mypy compatibility
Expand Down

0 comments on commit ffbb64a

Please sign in to comment.