Skip to content

Commit

Permalink
build: update Miniconda setup and conda package publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucs1590 committed Jul 3, 2024
1 parent d953119 commit eb9ffe5
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,31 @@ jobs:
deploy-conda:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: publish-to-conda
uses: maxibor/conda-[email protected]
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
subDir: "."
AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}
activate-environment: nkocr-build
python-version: 3.x
conda-forge-priority: true

- name: Cache conda dependencies
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('meta.yml') }}
restore-keys: ${{ runner.os }}-conda-

- name: Build conda package
shell: bash -l {0}
run: |
conda install conda-build anaconda-client -y
conda mambabuild -c conda-forge .
- name: Publish to Anaconda
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda -t $ANACONDA_TOKEN upload -u Lucs1590 -l main --force "$(conda build . --output)"

0 comments on commit eb9ffe5

Please sign in to comment.