1-
2- name : Build and upload conda packages
1+ name : Publish Pyatlan Package to Anaconda
32
43on :
54 release :
65 types : [ published ]
76 workflow_dispatch :
87
98jobs :
10- conda_deployment_with_new_tag :
11- name : Conda deployment of package with Python ${{ matrix.python-version }}
9+ conda_deployment :
10+ name : Build and upload noarch (all platforms) package
1211 runs-on : ubuntu-latest
13- strategy :
14- matrix :
15- python-version : ["3.9", "3.10", "3.11", "3.12"]
1612 steps :
1713 - uses : actions/checkout@v4
1814 with :
2117 - name : Conda environment creation and activation
2218 uses : conda-incubator/setup-miniconda@v3
2319 with :
24- python-version : ${{ matrix.python-version }}
20+ python-version : " 3.9 "
2521 environment-file : .conda-envs/build-env.yaml
2622 auto-update-conda : false
2723 auto-activate-base : false
@@ -40,33 +36,12 @@ jobs:
4036 run : |
4137 conda install conda-build anaconda-client anaconda-auth -y
4238
43- - name : Build conda package
39+ - name : Build noarch conda package
4440 env :
4541 PYATLAN_VERSION : ${{ env.PYATLAN_VERSION }}
4642 run : |
47- echo "Building conda package with version: $PYATLAN_VERSION"
48- conda build .conda-envs/meta.yaml --python ${{ matrix.python-version }} --output-folder /tmp/conda-builds --package-format tar.bz2
49-
50- - name : Convert to specific platforms
51- run : |
52- # Find the built package
53- PACKAGE_PATH=$(find /tmp/conda-builds -name "*.tar.bz2" | head -1)
54- if [ -z "$PACKAGE_PATH" ]; then
55- echo "No package found to convert"
56- exit 1
57- fi
58- echo "Found package: $PACKAGE_PATH"
59-
60- # Check if it's a noarch package
61- if [[ "$PACKAGE_PATH" == *"/noarch/"* ]]; then
62- echo "Package is noarch, skipping conversion (already architecture-independent)"
63- else
64- # Convert to specific architectures only
65- conda convert -p win-64 "$PACKAGE_PATH" -o /tmp/conda-builds
66- conda convert -p linux-64 "$PACKAGE_PATH" -o /tmp/conda-builds
67- conda convert -p osx-64 "$PACKAGE_PATH" -o /tmp/conda-builds
68- fi
69-
43+ echo "Building noarch conda package with version: $PYATLAN_VERSION"
44+ conda build .conda-envs/meta.yaml --output-folder /tmp/conda-builds --package-format tar.bz2
7045
7146 - name : Upload to Anaconda
7247 env :
@@ -88,11 +63,10 @@ jobs:
8863 ANACONDA_CMD="anaconda"
8964 fi
9065
91- # Upload all packages, but handle noarch conflicts gracefully
66+ # Upload the noarch package
9267 for pkg in /tmp/conda-builds/*/*.tar.bz2; do
9368 if [ -f "$pkg" ]; then
94- echo "Attempting to upload $pkg..."
95- # Capture the output to check for errors
69+ echo "Uploading noarch package: $pkg"
9670 UPLOAD_OUTPUT=$($ANACONDA_CMD upload --user atlanhq --label main "$pkg" 2>&1)
9771 UPLOAD_EXIT_CODE=$?
9872
10781 else
10882 echo "Upload failed for $pkg (exit code: $UPLOAD_EXIT_CODE):"
10983 echo "$UPLOAD_OUTPUT"
110- # Don't fail the build for upload errors, just log them
84+ exit 1
11185 fi
11286 fi
11387 done
0 commit comments