Skip to content

Commit

Permalink
Add GitHub action to build and deposit conda packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tpeulen committed Feb 6, 2024
1 parent e892ec5 commit 8e8b2d7
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/conda-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

name: Build and Upload Conda Packages

on:
# push:
# branches:
# - develop
release:
types: ['released', 'prereleased']

jobs:
build:
name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Display Conda Settings
shell: bash -el {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Build Conda Package
shell: bash -el {0}
run: |
mamba install conda-build boa anaconda-client
conda mambabuild conda-recipe --output-folder conda-bld
- name: Upload Conda Package
shell: bash -el {0}
run: |
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u tpeulen --force conda-bld/**/*.tar.bz2

0 comments on commit 8e8b2d7

Please sign in to comment.