Skip to content

v5.7.0 Release Notes #40

v5.7.0 Release Notes

v5.7.0 Release Notes #40

Workflow file for this run

name: Publish
on:
release:
types: [published]
permissions:
contents: read
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install build --user
- name: Build package
run: >-
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
anaconda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install openssl curl
conda install -y anaconda-client conda-build conda-verify
python -m pip install --upgrade pip
pip install setuptools wheel build
- name: Publish distribution to Anaconda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
mkdir ./conda-build # create the artifact dir
# Get the version of the library
export TORCHHD_VERSION=$(python -c "with open('torchhd/version.py') as f: exec(f.read()); print(__version__)")
# Build for noarch platform
conda-build -c pytorch --output-folder ./conda-build ./conda
# Upload noarch version of torchhd to anaconda
anaconda upload -u torchhd --label main ./conda-build/*/*.tar.bz2