update_dq improvement in findsat_mrt (#201) #4
This file contains 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: Wheel building | |
on: | |
pull_request: | |
# We also want this workflow triggered if the 'Build wheels' | |
# label is added or present when PR is updated | |
types: | |
- synchronize | |
- labeled | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# NOTE: Cannot use OpenAstronomy workflow due to | |
# https://github.com/OpenAstronomy/github-actions-workflows/issues/168 | |
jobs: | |
build_and_publish: | |
# This job builds the wheels and publishes them to PyPI for all | |
# tags. For PRs with the "Build wheels" label, wheels are built, | |
# but are not uploaded to PyPI. | |
permissions: | |
contents: none | |
runs-on: ubuntu-latest | |
if: (github.repository == 'spacetelescope/acstools' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Build wheels'))) | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- 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/* | |
# FOR DEBUGGING ONLY: repository_url (TestPyPI) and verbose; | |
# Use appropriate token if debugging with TestPyPI | |
- name: Publish distribution 📦 to PyPI | |
if: (startsWith(github.ref, 'refs/tags/') && github.event_name == 'push') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
#repository_url: https://test.pypi.org/legacy/ | |
#verbose: true |