Conda package building and deploying (to Anaconda) can be configured in GitHub action so that when a certain action triggers the GitHub action, the conda package will be built and deployed automatically. As part of the setup, the Anaconda token is required in the GitHub settings so that the secure connection could be established for the automatic deploying the package to Anaconda. Here follows is a general procedure that one could follow for the token setup.

  1. Go to Anaconda project web page, e.g., https://anaconda.org/neutrons/mantid-total-scattering/settings/collaborators and check whether one is in the admin group -- refer to the image below,

anaconda_check


If one is in the admin group, that means we can generate Anaconda token in the Anaconda user settings page as detailed in next step. Otherwise, one need to request for the admin access first.

  1. Once making sure one is in the admin list, go to the user settings following the image below,

anaconda_user_setting

  1. Go to 'Access' in user settings,

anaconda_token_setting

Then fill in a token name, select relevant scopes (which controls what one can do with the token) and give it an expiration date.

  1. The resulted token will be displayed on top of the web page and one can select and copy it for the next step,

anaconda_token_copy


The token here (which is already masked out) was created for this demo only and has already been revoked (thus no longer valid).

  1. With the copied token from previous step, one should go to the GitHub settings page of the repository to be configured, and then follow the instruction below to put in the copied Anaconda token. Either one can create a new repository token or one can change an existing one.

github_token_settings

The token change can be done at any time but will usually be needed when the existing token has expired. Also, it should be mentioned that if the token will be used for deploying a conda package to anaconda cloud, the package will be uploaded to the channel of the specific user who was creating the token.