diff --git a/.github/workflows/ci_publish.yml b/.github/workflows/ci_publish.yml index 2b5132a..b08d981 100644 --- a/.github/workflows/ci_publish.yml +++ b/.github/workflows/ci_publish.yml @@ -55,3 +55,35 @@ jobs: - name: publish uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 + + publish-to-conda: + name: Publish to Conda + if: startsWith(github.ref, 'refs/tags/') + needs: + - publish-to-pypi + runs-on: conda/miniconda3:latest + environment: conda + steps: + - name: Install conda requirements + run: | + conda install anaconda-client conda-build + + - name: Install Grayskull + run: | + conda install -c conda-forge grayskull=3.1.0 + + - name: Build conda metadata + run: | + conda grayskull pypi data-validation-engine + + - name: Build Conda packages + run: | + conda config --set anaconda_upload no + conda build . -c conda-forge --output-folder ./conda_dist/ + + - name: upload dist + env: + ANACONDA_TOKEN = ${{ secrets.ANACONDA_TOKEN }} + run: | + anaconda upload conda_dist/*.tar.bz2 --token "$ANACONDA_TOKEN" --user "$ANACONDA_USER" + anaconda upload conda_dist/*.conda --token "$ANACONDA_TOKEN" --user "$ANACONDA_USER" diff --git a/.gitignore b/.gitignore index 46856a4..5a37983 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ spark-warehouse/* build/ develop-eggs/ dist/ +conda_dist/ +data-validation-engine/ downloads/ eggs/ .eggs/ @@ -109,7 +111,7 @@ celerybeat.pid # Environments .env -.venv +.venv* env/ venv/ ENV/