Skip to content

NumPy 2.0 compatibility #36

NumPy 2.0 compatibility

NumPy 2.0 compatibility #36

Workflow file for this run

name: Release
on:
pull_request:
release:
types: [released]
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 == 'spacetelescope/stsynphot_refactor'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install python-build and twine
run: python -m pip install build "twine>=3.3"
- 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-astropy ci-watson stsynphot_refactor/dist/*.whl
testenv/bin/python -c "import stsynphot; stsynphot.test()"
# FOR DEBUGGING ONLY: repository_url (TestPyPI) and verbose;
# Use appropriate token if debugging with TestPyPI
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
#repository_url: https://test.pypi.org/legacy/
#verbose: true