Skip to content

v2.4.0

v2.4.0 #1

Workflow file for this run

name: Check & Deploy
on:
release:
types:
- published
jobs:
check-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v2
with:
submodules: true
path: _src/
- name: Install Python dependencies
run: |
pushd _src
pip install .[testing]
pip install pytest
popd
- name: Test with pytest
run: |
pushd _src
pytest
popd
- name: Verify release version matches source code version
shell: bash
run: |
pushd _src
export TAG_VERSION=${GITHUB_REF##refs/tags/v}
export SRC_VERSION=$(python3 -c "from smelli._version import __version__; print(__version__)")
if [[ ${TAG_VERSION} != ${SRC_VERSION} ]] ; then
echo "tag/release version and source code version disagree, exiting"
exit 1
fi
popd
- name: Build sdist
shell: bash
run: |
mkdir dist
pushd _src
python3 ./setup.py sdist -d ../dist/
popd
- name: Upload build as artifact
uses: actions/upload-artifact@v1
with:
name: smelli-dist-${{ github.sha }}
path: dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.TWINE_USERNAME }}
password: ${{ secrets.TWINE_PASSWORD }}