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 ea75cfb commit 31f5422
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 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 @@ -51,3 +53,38 @@ jobs:
LTD_USERNAME: ${{ secrets.LTD_USERNAME }}
run: |
ltd upload --gh --product "astro-metadata-translator" --dir doc/_build/html
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 }}
11 changes: 9 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
name = astro_metadata_translator
name = lsst-astro-metadata-translator
description = A translator for astronomical metadata.
author = Tim Jenness
author_email = tjenness@lsst.org
Expand All @@ -10,8 +10,15 @@ classifiers =
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.md
long_description_content_type = text/markdown

keywords =
lsst

[options]
zip_safe = True
Expand Down

0 comments on commit 31f5422

Please sign in to comment.