Skip to content

Verify README examples, release to PyPI #27

Verify README examples, release to PyPI

Verify README examples, release to PyPI #27

Workflow file for this run

name: Verify README examples, release to PyPI
on:
push:
branches: [ "main" ]
tags: [ "v**" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
test:
name: Verify README examples
runs-on: ubuntu-latest
steps:
- run: |
which which
echo $PATH
echo ${{ env.PATH }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: 'requirements*.txt'
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install parquet2json
- name: Install dvc-utils
run: pip install -e . -r requirements-ci.txt
- name: '`dvc pull` test/data'
working-directory: test/data
run: dvc pull -r s3 -R -A
- name: Set up parquet-helpers
uses: actions/checkout@v4
with:
repository: ryan-williams/parquet-helpers
path: pqt
- name: Verify README examples
env:
# Evaluate README examples from within the `test/data` submodule
BMDF_WORKDIR: test/data
PATH: pqt:${{ env.PATH }}
run: |
. pqt/.pqt-rc
export SHELL
echo "PATH=$PATH"
# mdcmd
# git diff --exit-code || true
release:
name: Release to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install release deps
run: pip install utz[setup] twine wheel
- name: Install dvc-utils
run: pip install -e .
- name: Build release
run: python setup.py sdist bdist_wheel
- name: Publish release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*