Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
pypi-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version from tag and update files
run: |
set -e
sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml
echo "Version set successfully in setup.py and conda/meta.yaml"
env:
VERSION: ${{ github.ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install PyPI dependencies
run: |
set -e
python -m pip install --upgrade pip setuptools wheel twine
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
set -e
python setup.py sdist bdist_wheel
twine upload dist/*
conda-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version from tag and update files
run: |
set -e
sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml
echo "Version set successfully in setup.py and conda/meta.yaml"
env:
VERSION: ${{ github.ref }}
- uses: s-weigand/setup-conda@v1
with:
python-version: '3.11'
- name: Install Conda dependencies
run: |
set -e
conda install -y anaconda-client conda-build conda-verify conda-libmamba-solver
conda config --set solver libmamba
conda config --set channel_priority flexible
conda config --set anaconda_upload yes
- name: Build Conda package
run: |
set -e
cd conda
conda build --user colomoto --token $ANACONDA_API_TOKEN --override-channels -c defaults -c conda-forge -c colomoto .
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}