Skip to content

remove inappropriate defaults in run_uvdata_uvsim #526

remove inappropriate defaults in run_uvdata_uvsim

remove inappropriate defaults in run_uvdata_uvsim #526

name: Publish Python distributions to PyPI and TestPyPI
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-latest
defaults:
run:
# Adding -l {0} helps ensure conda can be found properly.
shell: bash -l {0}
env:
ENV_NAME: publish
PYTHON: 3.9
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup Minimamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ env.PYTHON }}
environment-file: ci/${{ env.ENV_NAME }}.yaml
activate-environment: ${{ env.ENV_NAME }}
- name: Conda Info
run: |
conda info -a
conda list
PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"`
if [[ $PYVER != ${{ env.PYTHON }} ]]; then
exit 1;
fi
- name: Create environment variable
if: startsWith(github.ref, 'refs/tags/') != true
run: |
wget https://gist.github.com/plaplant/0902f09e59166bac742bbd554f3cd2f9/raw/make_dev_version.sh
version=$(bash make_dev_version.sh)
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$version" >> $GITHUB_ENV
- name: Check environment variable
run: echo $SETUPTOOLS_SCM_PRETEND_VERSION
- name: Build a binary wheel and a source tarball
run: |
python3 -m build
- name: Publish to Test PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}