Skip to content

Commit 996433f

Browse files
authored
Add conda build / upload via gh action (#9)
1 parent ee7e0cd commit 996433f

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/deploy.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '1.*'
7+
8+
jobs:
9+
package:
10+
strategy:
11+
matrix:
12+
os: [macos-latest, windows-latest, ubuntu-latest]
13+
runs-on: ${{ matrix.os }}
14+
env:
15+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- uses: conda-incubator/setup-miniconda@v2
21+
with:
22+
auto-update-conda: true
23+
auto-activate-base: true
24+
activate-environment: bld-env
25+
environment-file: .github/workflows/etc/bld-environment.yml
26+
condarc-file: .github/workflows/etc/.condarc
27+
miniforge-variant: Miniforge3
28+
use-mamba: true
29+
- name: linux conda build
30+
if: matrix.os == 'ubuntu-latest'
31+
shell: bash -l {0}
32+
run: conda mambabuild -c conda-forge conda-recipe
33+
- name: osx conda build
34+
if: matrix.os == 'macos-latest'
35+
shell: bash -l {0}
36+
run: conda mambabuild -c conda-forge conda-recipe
37+
- name: windows conda build
38+
if: matrix.os == 'windows-latest'
39+
shell: cmd /C CALL {0}
40+
run: conda mambabuild -c conda-forge conda-recipe

.github/workflows/etc/.condarc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
anaconda_upload: True
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: bld-env
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- anaconda-client
7+
- conda-build
8+
- setuptools_scm
9+
- boa

0 commit comments

Comments
 (0)