Skip to content

Commit

Permalink
Test conda upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mauzey1 committed Jul 9, 2024
1 parent 7a6e938 commit 65b759a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CMOR Nightly Build
run-name: CMOR Nightly Build
on: [push]
on:
push:
branches:
- "github_action_exp"
pull_request:
branches:
- "main"

jobs:
nightly:
Expand All @@ -21,6 +27,8 @@ jobs:
CONDA_FORGE_CHANNEL: conda-forge
C_COMPILER: clang_osx-arm64
FORTRAN_COMPILER: gfortran_osx-arm64
CONDA_USER: pcmdi
CONDA_LABEL: testing
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -108,3 +116,15 @@ jobs:
./configure --prefix=$CONDA_PREFIX --with-python --with-uuid=$CONDA_PREFIX --with-json-c=$CONDA_PREFIX --with-udunits2=$CONDA_PREFIX --with-netcdf=$CONDA_PREFIX --enable-verbose-test
make test -o cmor -o python
- name: Conda Upload
env:
CONDA_UPLOAD_TOKEN: $${{ secrets.CONDA_UPLOAD_TOKEN }}
if: ${{ github.ref == 'refs/heads/github_action_exp' }}
run: |
source $PROJECT_DIR/miniconda/etc/profile.d/conda.sh
conda activate base
conda config --set anaconda_upload no
conda install -n base anaconda-client
export ARTIFACT_DIR=`pwd`/artifacts
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $CONDA_USER -l $CONDA_LABEL $ARTIFACT_DIR/*/*.tar.bz2 --force

0 comments on commit 65b759a

Please sign in to comment.