Repository navigation
56 lines (46 loc) · 1.85 KB
/
Copy pathconda_deploy.yml
File metadata and controls
56 lines (46 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Conda Deployment
on:
release:
types: [created, edited]
workflow_dispatch:
push:
branches:
- master
jobs:
conda_build_test_deploy:
name: Conda Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8"] # 3.8 does not seem to generate any new files for conda and breaks on macos X ... revisit this later
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/workflows/resources/conda_build_environment.yml') }}
- name: Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
environment-file: .github/workflows/resources/conda_build_environment.yml
activate-environment: conda-build
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Conda Upload
shell: bash -l {0}
run: |
conda config --set anaconda_upload yes
conda config --add channels conda-forge
conda config --add channels geo-down-under
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --user geo-down-under webdav-conda
conda-build --user geo-down-under conda
anaconda logout