packages #256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 15 * * SUN' | |
env: | |
PYTHON_VERSION: "3.11" | |
defaults: | |
run: | |
shell: bash -e {0} | |
jobs: | |
pixi_lock: | |
name: Pixi lock | |
runs-on: ubuntu-latest | |
steps: | |
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0 | |
conda_build: | |
name: Build Conda | |
needs: [pixi_lock] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0 | |
with: | |
environments: "build" | |
download-data: false | |
install: false | |
- name: conda build | |
run: pixi run -e build build-conda | |
- name: Set environment variables | |
run: | | |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "CONDA_FILE=$(ls dist/*.tar.bz2)" >> $GITHUB_ENV | |
- name: conda dev upload | |
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc') | |
# run: pixi run -e build publish-conda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $CONDA_FILE | |
run: echo "dev" | |
- name: conda main upload | |
if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc'))) | |
# run: pixi run -e build publish-conda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $CONDA_FILE | |
run: echo "prod" | |
pip_build: | |
name: Build PyPI | |
needs: [pixi_lock] | |
runs-on: "ubuntu-latest" | |
permissions: | |
id-token: write | |
steps: | |
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0 | |
with: | |
environments: "build" | |
download-data: false | |
install: false | |
- name: Build package | |
run: pixi run -e build build-pip | |
- name: Publish to PyPI | |
if: github.event_name == 'push' | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
run: echo "publish" |