Skip to content

Commit 759eb3f

Browse files
committed
Fix conda publication script
1 parent 2ece20a commit 759eb3f

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ jobs:
5353
run: |
5454
conda install -y anaconda-client conda-build conda-verify
5555
- name: Publish distribution to Anaconda
56-
with:
57-
subdir: 'conda'
58-
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
59-
platforms: 'win osx linux'
60-
run: >-
56+
run: |
57+
export ANACONDA_API_TOKEN = ${{ secrets.ANACONDA_TOKEN }}
6158
./scripts/conda_publish.sh

scripts/conda_publish.sh

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
set -ex
44
set -o pipefail
55

6-
go_to_build_dir() {
7-
if [ ! -z $INPUT_SUBDIR ]; then
8-
cd $INPUT_SUBDIR
9-
fi
10-
}
11-
126
check_if_setup_file_exists() {
137
if [ ! -f setup.py ]; then
148
echo "setup.py must exist in the directory that is being packaged and published."
@@ -28,29 +22,18 @@ build_package(){
2822
conda build -c conda-forge -c pytorch --output-folder . .
2923

3024
# Convert to other platforms: OSX, WIN
31-
if [[ $INPUT_PLATFORMS == *"osx"* ]]; then
3225
conda convert -p osx-64 linux-64/*.tar.bz2
33-
fi
34-
if [[ $INPUT_PLATFORMS == *"win"* ]]; then
3526
conda convert -p win-64 linux-64/*.tar.bz2
36-
fi
3727
}
3828

3929
upload_package(){
40-
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
41-
if [[ $INPUT_PLATFORMS == *"osx"* ]]; then
4230
anaconda upload --label main osx-64/*.tar.bz2
43-
fi
44-
if [[ $INPUT_PLATFORMS == *"linux"* ]]; then
4531
anaconda upload --label main linux-64/*.tar.bz2
46-
fi
47-
if [[ $INPUT_PLATFORMS == *"win"* ]]; then
4832
anaconda upload --label main win-64/*.tar.bz2
49-
fi
5033
}
5134

5235
check_if_setup_file_exists
53-
go_to_build_dir
36+
cd ./conda # go to build dir
5437
check_if_meta_yaml_file_exists
5538
build_package
5639
upload_package

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="hdc",
10-
version="0.5.1",
10+
version="0.5.2",
1111
description="Python library for Hyperdimensional Computing",
1212
long_description=open("README.md").read(),
1313
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)