Skip to content

Commit 893400b

Browse files
committed
fix token availability
1 parent c021a09 commit 893400b

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/multibuild.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,20 @@ jobs:
6969
build_lib "$PLAT" "$INTERFACE64"
7070
- name: Upload tarballs
7171
run: |
72-
pip install git+https://github.com/Anaconda-Server/anaconda-client;
73-
# The first -t option refers to the token, the second is the "type"
74-
# option to the "upload" command
75-
anaconda -t ${{ secrets.MULTIBUILD_WHEELS_STAGING_BUILD }} upload \
76-
--no-progress --force -u multibuild-wheels-staging \
77-
-t file -p "openblas-libs" \
78-
-v "$(cd OpenBLAS && git describe --tags --abbrev=8)" \
79-
-d "OpenBLAS for multibuild wheels" \
80-
-s "OpenBLAS for multibuild wheels" \
81-
libs/openblas*.tar.gz
82-
72+
set -ex
73+
TOKEN=${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }}
74+
if [ "$TOKEN" == "" ]; then
75+
# The token is available when under the MacPython org, not on forks
76+
echo "secrets.MULTIBUILD_WHEELS_STAGING_ACCESS is not defined: skipping";
77+
else
78+
pip install git+https://github.com/Anaconda-Server/anaconda-client;
79+
# The first -t option refers to the token, the second is the "type"
80+
# option to the "upload" command
81+
anaconda -t ${TOKEN} upload \
82+
--no-progress --force -u multibuild-wheels-staging \
83+
-t file -p "openblas-libs" \
84+
-v "$(cd OpenBLAS && git describe --tags --abbrev=8)" \
85+
-d "OpenBLAS for multibuild wheels" \
86+
-s "OpenBLAS for multibuild wheels" \
87+
libs/openblas*.tar.gz;
88+
fi

0 commit comments

Comments
 (0)