Skip to content

v2.13.20 - Docs updates #586

v2.13.20 - Docs updates

v2.13.20 - Docs updates #586

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [created]
jobs:
test:
runs-on: ${{ matrix.os }}
if: github.event_name != 'release' && !github.event.pull_request.draft
env:
REDBRICK_SDK_API_KEY: ${{ secrets.REDBRICK_SDK_API_KEY }}
REDBRICK_SDK_URL: ${{ secrets.REDBRICK_SDK_URL }}
REDBRICK_SDK_ORG_ID: ${{ secrets.REDBRICK_SDK_ORG_ID }}
REDBRICK_SDK_PROJECT_ID: ${{ secrets.REDBRICK_SDK_PROJECT_ID }}
REDBRICK_SDK_SOURCE: GITHUB
REDBRICK_SDK_DEBUG: 1
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Lint + Unit Tests
run: |
pytest redbrick --mypy --black --eradicate --pycodestyle --pydocstyle --flake8 --pylint --pylint-rcfile=setup.cfg
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*