-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (37 loc) · 1.37 KB
/
FEZrs_Conda_Publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Conda Publish
on:
workflow_run:
workflows: ["PyPI Publish"]
types:
- completed
jobs:
conda_publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set FEZRS_VERSION
run: echo "FEZRS_VERSION=$(cat VERSION)" >> $GITHUB_ENV # Set the version from the VERSION file
- name: Set up Miniconda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3
export PATH="$HOME/miniconda3/bin:$PATH"
conda config --add channels conda-forge
conda install -y conda-build anaconda-client
- name: Build Conda package
run: |
export PATH="$HOME/miniconda3/bin:$PATH"
conda build recipe/
- name: Upload Conda package to Anaconda
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA_API_KEY }}
run: |
export PATH="$HOME/miniconda3/bin:$PATH"
PACKAGE_PATH=$(find $HOME/miniconda3/conda-bld/linux-64 -name '*fezrs*.tar.bz2' | head -n 1)
if [ -z "$PACKAGE_PATH" ]; then
echo "No Conda package found to upload!"
exit 1
fi
anaconda upload $PACKAGE_PATH --token $ANACONDA_API_KEY