Skip to content

Commit

Permalink
Revert "Remove conda from CI"
Browse files Browse the repository at this point in the history
This reverts commit 656c797.
  • Loading branch information
coretl committed Dec 19, 2022
1 parent 987588f commit 22ffedc
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,42 @@ jobs:
- name: Test cli works in runtime image
run: docker run ${{ env.IMAGE_REPOSITORY }} --version

conda:
needs: [dist]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3

- name: Create Conda recipe
run: |
mkdir -p conda/recipe
pipx run grayskull pypi -o conda/recipe dist/*.tar.gz
- name: Install conda-build
run: conda install -y conda-build

- name: Build Conda distribution
run: |
mkdir -p conda/build
conda build --output-folder conda/build conda/recipe/*/meta.yaml
- name: Upload conda build
uses: actions/upload-artifact@v3
with:
name: conda_build
path: |
conda/build/
!conda/build/*/.cache
release:
# upload to PyPI and make a release on every tag
needs: [lint, dist, test]
needs: [lint, dist, test, conda]
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
runs-on: ubuntu-latest
env:
HAS_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN != '' }}
HAS_ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN != '' }}

steps:
- uses: actions/download-artifact@v3
Expand All @@ -208,3 +237,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish to Anaconda
if: ${{ env.HAS_ANACONDA_TOKEN }}
run: pipx run --spec anaconda-client anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload conda_build/noarch/*.tar.bz2

0 comments on commit 22ffedc

Please sign in to comment.