Skip to content

Upload geocat-viz to PyPI #13

Upload geocat-viz to PyPI

Upload geocat-viz to PyPI #13

Workflow file for this run

name: Upload geocat-viz to PyPI
on:
workflow_dispatch:
jobs:
test-build:
if: github.repository == 'NCAR/geocat-viz'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4.5.0
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- name: Build tarball and wheels
run: |
python setup.py sdist bdist_wheel
python -m pip wheel . -w dist --no-deps
- name: Test the artifacts
run: |
python -m twine check dist/*
publish:
needs: test-build
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4.5.0
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- name: Build tarball and wheels
run: |
python setup.py sdist bdist_wheel
python -m pip wheel . -w dist --no-deps
- name: Test the artifacts
run: |
python -m twine check dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
user: __token__
password: ${{ secrets.PYPI_GEOCAT_VIZ }}
skip_existing: true
verbose: true