11name : publish_conda
22on :
3+ pull_request:
34 push:
45 branches:
56 - main
1819 - name: Checkout Files
1920 uses: actions/checkout@v4
2021 with :
21- recursive: true
22+ submodules: 'recursive'
2223
2324 - name: Set up base Miniforge
2425 uses: conda-incubator/setup-miniconda@v3
2930 conda-remove-defaults: true
3031 channels: conda-forge,noaa-gfdl
3132
33+ - name: Conda install conda-build
34+ run: |
35+ echo "conda install conda-build"
36+ conda install conda-forge::conda-build conda-forge::anaconda-client
37+
3238 - name: Configure Conda
3339 run: |
3440 echo "setting strict channel priority"
@@ -40,35 +46,15 @@ jobs:
4046 echo "printing conda config just in case"
4147 conda config --show
4248
43- - name: Conda install conda-build
44- run: |
45- echo "conda install conda-build"
46- conda install conda-forge::conda-build conda-forge::anaconda-client
47-
48- - name: Build fremor Conda Package
49- env:
50- ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
51- run: |
52- echo "sanity check, is the token available as a secret? is the env var set?"
53- if [ -z "${{ secrets.ANACONDA_TOKEN }}" ]; then
54- echo "ERROR: ANACONDA_TOKEN is empty or not accessible"
55- exit 1
56- else
57- echo "ANACONDA_TOKEN is set (length: ${#ANACONDA_API_TOKEN})"
58- fi
59-
60- echo ""
61- echo "sanity check, conda build version is"
62- conda build --version
63-
64- echo ""
65- echo "sanity check, python version"
66- python --version
67-
49+ - name: Conda Build Check
50+ run: |
6851 echo ""
6952 echo "sanity check, conda build check"
70- conda build --check .
53+ conda build --check .
7154
55+ - name: Build fremor Conda Package
56+ run: |
7257 echo ""
7358 echo "building conda package for publishing"
59+ export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }}
7460 conda build --no-include-recipe --no-test .
0 commit comments