Skip to content

Improvements #2

@goanpeca

Description

@goanpeca

Awesome on using the action @chrisdembia :-p so, on your example you could do it like:

name: Windows

# syntax https://help.github.com/en/articles/workflow-syntax-for-github-actions
on:
  push:
    branches: 
      - '*'
    tags:
      - '*'
    
jobs:
  conda:
    name: conda-build

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v1
  
    - uses: goanpeca/setup-miniconda@v1.0.1
      with:
        auto-update-conda: true
        activate-environment: packaging   # This will create and auto activate this environment
        # This will be installed on packaging but with the defaults channel
        python-version: 3.7
        # Should I add a default_channels input (like the condarc option?)
        # https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#default-channels
        default_channels: conda-forge,some-other-channel
        channels: other-channel
        
    - name: Initialize Conda for Powershell
      shell: pwsh
      run: conda install --channel conda-forge anaconda-client conda-verify  # since it is auto activated, no need to specify name and switched the create for install

    - name: Deploy Conda package
      run: |
        # conda config --set anaconda_upload yes
        echo "login"
        # anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
        echo "build"
        # conda-build --channel conda-forge --user opensim-org .
        # conda-build --channel conda-forge --user opensim-org --token ${{ secrets.ANACONDA_TOKEN }} .
        conda-build --channel conda-forge .
        echo "logout"
        anaconda logout

You could probably use an environment.yml file where you could specify all your needed packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions