Skip to content

Commit

Permalink
Merge pull request #126 from lsst/tickets/DM-35047
Browse files Browse the repository at this point in the history
Add upload to pypi
  • Loading branch information
mwittgen committed Jun 10, 2022
2 parents 894b03d + b96a903 commit 77aa7bc
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 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 }}
11 changes: 7 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
See COPYRIGHT file for code ownership.
BSD 3-Clause License

Copyright (c) 2022, lsst
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -10,9 +13,9 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand Down
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 77aa7bc

Please sign in to comment.