Skip to content

Commit

Permalink
feat: Build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 18, 2019
1 parent 88b29a4 commit f41ada3
Show file tree
Hide file tree
Showing 5 changed files with 5,362 additions and 62 deletions.
61 changes: 0 additions & 61 deletions .gitignore

This file was deleted.

71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,71 @@
# setup-conda
Github Action which installs conda

[![Tests](https://github.com/s-weigand/setup-conda/workflows/Tests/badge.svg)](https://github.com/s-weigand/setup-conda/actions)

This action adds the [`conda`](https://conda.io/projects/conda/en/latest/user-guide/tasks/index.html)
command from the on the worker preinstalled miniconda version to the known shell commands.

## Inputs

| Name | Requirement | Default | Description |
| ---------------- | ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `activate-conda` | _optional_ | `true` | Wether to activate the conda base env. |
| `update-conda` | _optional_ | `false` | If conda should be updated before running other commands. |
| `python-version` | _optional_ | `'default'` | Python version which should be installed with conda. |
| `conda-channels` | _optional_ | `''` | Additional channels like 'conda-forge', as coma separated list, which can be used to install packages. The last channel in the list, will have the highest priority. |

# Usage

See [action.yml](action.yml)

## Basic:

The basic usage makes the conda python version the default python (`$ conda activate base`).

```yaml
steps:
- uses: actions/checkout@v2
- uses: s-weigand/setup-conda@v1
- run: conda --version
- run: which python
```
If don't want to change the python version which is used
(i.e. you just need to install a none python package), you can use `activate-conda: false`.

```yaml
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: s-weigand/setup-conda@v1
with:
activate-conda: false
- run: conda --version
- run: which python
```

## Matrix Testing:

```yaml
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.6, 3.7, 3.8]
name: Python ${{ matrix.python-version }} example
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- run: conda --version
- run: which python
```
28 changes: 28 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'setup-conda'
description: 'Setup conda to use in later actions'
author: 'Sebastian Weigand'
inputs:
activate-conda:
description: "Wether to activate the conda base env (Default: 'true')"
required: false
default: 'true'
update-conda:
description: "If conda should be updated before running other commands (Default: 'false')"
required: false
default: 'false'
python-version:
description: "Python version which should be installed with conda (default: 'Default')"
required: false
default: 'default'
conda-channels:
description: "Additional channels like 'conda-forge' which can be used to install packages"
required: false
default: ''

runs:
using: 'node12'
main: 'dist/index.js'

branding:
icon: 'code'
color: 'yellow'
1 change: 1 addition & 0 deletions build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"owner":"s-weigand","repo":"setup-conda","sha":"fd29ea5827f85aedaf899dc6bcaa8744b2e2d948","ref":"refs/tags/v1.0.2","tagName":"v1.0.2","branch":"release","tags":["v1","v1.0.2"],"updated_at":"2019-12-18T20:30:55.396Z"}
Loading

0 comments on commit f41ada3

Please sign in to comment.