Files
tpot/.github/workflows/publish_package.yml
perib 414d215d1e Update _version.py
squash build recipe

squash conda build with forge working

squah moved license

squash test build on gh

squash testpypi for now

squash test only conda

squash fixed mispelled repo

squash try full path to grayskull

squash test using $CONDA

squash was missing conda-build

squash test conda upload with invalid token

squash test upload to my channel

squash fixed needed $CONDA for upload

publish to conda-forge

removed release directory

Update _version.py

publish package to conda-forge
2023-05-04 14:59:02 -07:00

67 lines
1.7 KiB
YAML

name: Publish Package
on:
release:
types: [published]
jobs:
build-and-publish-pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
build-and-publish-conda:
needs: build-and-publish-pypi
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
conda install -c conda-forge grayskull conda-build anaconda-client -y
- name: Build conda recipe from PYPI
run: |
$CONDA/bin/grayskull pypi tpot2
- name: Update meta.yaml
run: |
sed -i "/tpot2 --help/d" tpot2/meta.yaml
sed -i "/^ license:/ s/.*/ license: LGPLv3/" tpot2/meta.yaml
sed -i "/^ license_file:/ s/.*/ license_file: ..\/LICENSE/" tpot2/meta.yaml
- name: Build package with conda-forge
run: |
$CONDA/bin/conda-build tpot2 -c conda-forge
- name: Upload to conda-forge
env:
CONDA_API_TOKEN: ${{ secrets.CONDA_API_TOKEN }}
run: |
$CONDA/bin/anaconda -t $CONDA_API_TOKEN upload -u conda-forge $CONDA/conda-bld/noarch/*.tar.bz2