Skip to content

packages

packages #84

Workflow file for this run

name: packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
# Dry-run only
workflow_dispatch:
schedule:
- cron: '0 9 * * SUN'
jobs:
conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS: "-c pyviz -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.7"
MPLBACKEND: "Agg"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ env.PYTHON_VERSION }}
- name: Fetch
run: git fetch --prune --tags -f
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
- name: conda build
run: doit package_build $CHANS $PKG_TEST_PYTHON --test-group=unit
- name: conda dev upload
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
- name: conda main upload
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS: "-c pyviz -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.7"
MPLBACKEND: "Agg"
PPU: ${{ secrets.PPU }}
PPP: ${{ secrets.PPP }}
PYPI: "https://upload.pypi.org/legacy/"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ env.PYTHON_VERSION }}
- name: Fetch
run: git fetch --prune --tags -f
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create $CHANS --python=$PYTHON_VERSION
- name: env setup
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit develop_install $CHANS_DEV -o unit_tests
doit pip_on_conda
- name: doit env_capture
run: |
conda activate test-environment
doit env_capture
- name: pip build
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_build
- name: pip upload
if: github.event_name == 'push'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI