Code Monkey home page Code Monkey logo

publish_conda_package_action's Introduction

Publish Anaconda Package Action

A Github Action to publish your Python package to Anaconda Cloud.

Starting 2.0.0, it uses mamba (from boa) to build the package (more faster than conda build command...)

Example workflow

name: Publish

on: [release]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: publish-to-conda
      uses: amauryval/[email protected]
      with:
        # CondaDir: locate the directory containing your meta.yml, conda_build_config.yaml (...) files
        CondaDir: 'conda'
        # Channels: You can add more channel with a space separator
        Channels: 'conda-forge an-other-chan' 
        # Platforms: remove one or more of these platforms
        Platforms: 'osx-64 linux-32 linux-64 win-32 win-64 noarch'
        CondaUsername: ${{ secrets.CONDA_USERNAME }}
        CondaPassword: ${{ secrets.CONDA_PASSWORD }}
  • Configure CONDA_USERNAME and CONDA_PASSWORD secrets on your settings repository

publish_conda_package_action's People

Contributors

amauryval avatar

Stargazers

 avatar  avatar

Watchers

 avatar

publish_conda_package_action's Issues

Issue with platforms

Hello,

I am having the following issue:

+ read file
+ find temp_build/ -name '*.tar.bz2'
+ echo temp_build/noarch/premise-0.4.2-0.tar.bz2
+ for PLATFORM in "${PLATFORMS[@]}"
temp_build/noarch/premise-0.4.2-0.tar.bz2
+ conda convert --force --platform osx-64 temp_build/noarch/premise-0.4.2-0.tar.bz2 -o temp_build/
Traceback (most recent call last):
  File "/opt/conda/bin/conda-convert", line 11, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.7/site-packages/conda_build/cli/main_convert.py", line 131, in main
    return execute(sys.argv[1:])
  File "/opt/conda/lib/python3.7/site-packages/conda_build/cli/main_convert.py", line 127, in execute
    api.convert(f, **args.__dict__)
  File "/opt/conda/lib/python3.7/site-packages/conda_build/api.py", line 300, in convert
    dry_run=dry_run, dependencies=dependencies)
  File "/opt/conda/lib/python3.7/site-packages/conda_build/convert.py", line 763, in conda_convert
    conversion_platform, source_platform, architecture = retrieve_package_platform(file_path)
  File "/opt/conda/lib/python3.7/site-packages/conda_build/convert.py", line 69, in retrieve_package_platform
    if platform.startswith('linux') or platform.startswith('osx'):
AttributeError: 'NoneType' object has no attribute 'startswith'

when using:

- name: Publish distribution ๐Ÿ“ฆ to Anaconda if Push
        uses: amauryval/[email protected]
        with:
          # CondaDir: locate the directory containing your meta.yml, conda_build_config.yaml (...) files
          CondaDir: 'conda'
          # Channels: You can add more channel with a space separator
          Channels: 'conda-forge'
          # Platforms: remove one or more of these platforms
          Platforms: 'osx-64 linux-32 linux-64 win-32 win-64'
          CondaUsername: ${{ secrets.CONDA_USERNAME }}
          CondaPassword: ${{ secrets.CONDA_PASSWORD }}

Should I modify the list of platforms?

Thanks.

Multiple channels fail

Hi,

I am having problems with deploying to conda using multiple channels in the main.yml file. I use the following configuration for channels: Channels: 'conda-forge some-other-channel'.

After a little investigation I found out that only the first channel is appended in the for loop:

for CHANNEL in $CHANNELS
do
    conda config --append channels $CHANNEL
done

Can you check this out please?

Best regards,
l.

Mamba install fails

I am trying the latest, 2.0.3 version of this gh action, but getting.

   > [3/5] RUN mamba install -y -c conda-forge anaconda-client conda-build conda-verify numpy boa=0.11.0:
  0.537   File "/opt/conda/bin/mamba", line 7, in <module>
  0.537     from mamba.mamba import main
  0.537   File "/opt/conda/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
  0.537     import libmambapy as api
  0.537   File "/opt/conda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
  0.537     raise e
  0.537   File "/opt/conda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
  0.537     from libmambapy.bindings import *  # noqa: F401,F403
  0.537     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  0.537 ImportError: libarchive.so.13: cannot open shared object file: No such file or directory

My configuration:

- name: Publish to Conda
  uses: amauryval/[email protected]
  with:
    CondaDir: 'py/h2o_wave/conda'
    Platforms: 'noarch'
    CondaUsername: ${{ secrets.CONDA_USERNAME }}
    CondaPassword: ${{ secrets.CONDA_PASSWORD }}
  env:
    # VERSION clashes with conda build. Use PKG_VERSION instead.
    PKG_VERSION: ${{ env.VERSION }}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.