7777 shell : bash -l {0}
7878
7979 steps :
80- - uses : actions/checkout@v4
80+ - uses : actions/checkout@v6
8181 with :
8282 # 如果是 workflow_run 触发,使用触发 CI Check 的 commit
8383 ref : ${{ github.event.workflow_run.head_sha || github.ref }}
@@ -131,14 +131,31 @@ jobs:
131131 if : steps.should_build.outputs.should_build == 'true'
132132 run : |
133133 echo "Building unilabos-env (conda environment dependencies)..."
134- rattler-build build -r .conda/env/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge
134+ rattler-build build -r .conda/environment/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge
135+
136+ - name : Upload unilabos-env to Anaconda.org (if enabled)
137+ if : steps.should_build.outputs.should_build == 'true' && github.event.inputs.upload_to_anaconda == 'true'
138+ run : |
139+ echo "Uploading unilabos-env to uni-lab organization..."
140+ for package in $(find ./output -name "unilabos-env*.conda"); do
141+ anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --user uni-lab --force "$package"
142+ done
135143
136144 - name : Build unilabos (with pip package)
137145 if : steps.should_build.outputs.should_build == 'true'
138146 run : |
139147 echo "Building unilabos package..."
148+ # 如果已上传到 Anaconda,从 uni-lab channel 获取 unilabos-env;否则从本地 output 获取
140149 rattler-build build -r .conda/base/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge --channel ./output
141150
151+ - name : Upload unilabos to Anaconda.org (if enabled)
152+ if : steps.should_build.outputs.should_build == 'true' && github.event.inputs.upload_to_anaconda == 'true'
153+ run : |
154+ echo "Uploading unilabos to uni-lab organization..."
155+ for package in $(find ./output -name "unilabos-0*.conda" -o -name "unilabos-[0-9]*.conda"); do
156+ anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --user uni-lab --force "$package"
157+ done
158+
142159 - name : Build unilabos-full - Only when explicitly requested
143160 if : |
144161 steps.should_build.outputs.should_build == 'true' &&
@@ -147,6 +164,17 @@ jobs:
147164 echo "Building unilabos-full package on ${{ matrix.platform }}..."
148165 rattler-build build -r .conda/full/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge --channel ./output
149166
167+ - name : Upload unilabos-full to Anaconda.org (if enabled)
168+ if : |
169+ steps.should_build.outputs.should_build == 'true' &&
170+ github.event.inputs.build_full == 'true' &&
171+ github.event.inputs.upload_to_anaconda == 'true'
172+ run : |
173+ echo "Uploading unilabos-full to uni-lab organization..."
174+ for package in $(find ./output -name "unilabos-full*.conda"); do
175+ anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --user uni-lab --force "$package"
176+ done
177+
150178 - name : List built packages
151179 if : steps.should_build.outputs.should_build == 'true'
152180 run : |
@@ -167,17 +195,9 @@ jobs:
167195
168196 - name : Upload conda package artifacts
169197 if : steps.should_build.outputs.should_build == 'true'
170- uses : actions/upload-artifact@v4
198+ uses : actions/upload-artifact@v6
171199 with :
172200 name : conda-package-unilabos-${{ matrix.platform }}
173201 path : conda-packages-temp
174202 if-no-files-found : warn
175203 retention-days : 30
176-
177- - name : Upload to Anaconda.org (uni-lab organization)
178- if : github.event.inputs.upload_to_anaconda == 'true'
179- run : |
180- for package in $(find ./output -name "*.conda"); do
181- echo "Uploading $package to uni-lab organization..."
182- anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --user uni-lab --force "$package"
183- done
0 commit comments