Skip to content

feat: in_range filtering (#2895) #1237

feat: in_range filtering (#2895)

feat: in_range filtering (#2895) #1237

Workflow file for this run

name: PyPI Release
# https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the master branch
push:
branches: [main]
release:
types: [published]
jobs:
build-sdist:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install --user --upgrade setuptools build
- name: Build source
run: |
python -m build --outdir dist/
ls -lh dist/
- uses: actions/upload-artifact@v2
with:
name: pypi-packages-${{ github.sha }}
path: dist
upload-packages:
runs-on: ubuntu-20.04
needs: build-sdist
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: pypi-packages-${{ github.sha }}
path: dist
- run: ls -lh dist/
- name: Upload to release
uses: AButler/upload-release-assets@v2.0
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
with:
files: 'dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
publish-pypi:
runs-on: ubuntu-20.04
needs: build-sdist
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/download-artifact@v2
with:
name: pypi-packages-${{ github.sha }}
path: dist
- run: ls -l dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.pypi_password }}