Skip to content

Merge pull request #276 from ASFHyP3/develop #3

Merge pull request #276 from ASFHyP3/develop

Merge pull request #276 from ASFHyP3/develop #3

Workflow file for this run

name: Distribute to PyPI
on:
push:
tags:
- v*
jobs:
distribute:
runs-on: ubuntu-latest
outputs:
SDIST_VERSION: ${{ steps.build.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel "setuptools-scm[toml]"
- name: Build distribuion
id: build
run: |
git fetch origin +refs/tags/*:refs/tags/*
export SDIST_VERSION=$(python setup.py --version)
echo "::set-output name=version::${SDIST_VERSION}"
python setup.py sdist bdist_wheel
- name: upload to PyPI.org
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TOOLS_PYPI_PAK }}
verify-distribution:
runs-on: ubuntu-latest
needs: distribute
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
python-version: 3.6
activate-environment: hyp3-lib
environment-file: environment.yml
- name: Pip install ${{ needs.distribute.outputs.SDIST_VERSION }}
shell: bash -l {0}
run: |
python -m pip install hyp3lib==${{ needs.distribute.outputs.SDIST_VERSION }}