Update WCS when shifting spectrum and fix bugs with arithmetic and redshift #137
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.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@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} |