Skip to content

Adding redshift and radial velocity properties to SpectrumCollection #205

Adding redshift and radial velocity properties to SpectrumCollection

Adding redshift and radial velocity properties to SpectrumCollection #205

Workflow file for this run

name: Release
on:
# NOTE: PR trigger is to ensure changes do not break packaging.
pull_request:
release:
types: [released]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
if: github.repository == 'astropy/specutils'
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/project/specutils
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Install python-build and twine
run: python -m pip install build "twine>=3.3" "importlib_metadata!=8.0.0"
- name: Build package
run: python -m build --sdist --wheel .
- name: List result
run: ls -l dist
- name: Check dist
run: python -m twine check --strict dist/*
- name: Test package
run: |
cd ..
python -m venv testenv
testenv/bin/pip install pytest pytest-astropy pytest-tornasync pytest-asdf-plugin specutils/dist/*.whl
testenv/bin/pytest --astropy-header --remote-data --pyargs specutils
# NOTE: Do not run this part for PR testing.
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
if: github.event_name != 'pull_request'