Skip to content

Commit

Permalink
Merge pull request #81 from umr-lops/build_ci
Browse files Browse the repository at this point in the history
Add action to build and upload package to anaconda
  • Loading branch information
Skealz authored Oct 21, 2024
2 parents 3fccd4c + 60d912e commit 0900449
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Upload Conda Package

on:
release:
types:
- created

jobs:
build-and-upload-conda-package:
if: true
runs-on: ubuntu-latest
#${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9

- name: Install conda-build
run: |
conda init
source ~/.bashrc
conda activate base
conda install -y -c conda-forge conda-build anaconda-client
- name: Build and Upload Conda package
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
cd recipe
conda init
source ~/.bashrc
conda activate base
conda-build . --token $ANACONDA_TOKEN --user tcevaer -c tcevaer -c conda-forge
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ dependencies = [
"scipy",
"fsspec",
"aiohttp",
"xarray-safe-s1",
"xradarsat2",
"xarray-safe-rcm"
]

dynamic = ["version"]
Expand Down

0 comments on commit 0900449

Please sign in to comment.