File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,26 @@ jobs:
238238 # See the upload-artifact step in the build job for the explanation of this pattern
239239 name : khiops-conda
240240 path : ./khiops-conda
241+ - name : Check Conda package / Git tag version coherence
242+ run : |
243+ # Install JQ, required in this step
244+ sudo apt-get install jq
245+ # Don't exit on first error: print relevant error message
246+ set +e
247+ # Extract Conda package version from the package artifact
248+ PACKAGE_VERSION=$( \
249+ unzip -p ./khiops-conda/noarch/*.conda info-*.tar.zst \
250+ | tar --zstd -axf - info/index.json -O \
251+ | jq -r ".version" \
252+ )
253+ # Convert pre-release version specification in the Git tag to the
254+ # Conda format and check that it matches the Conda package version
255+ echo ${{ github.ref_name }} | tr -d '-' | grep -wq $PACKAGE_VERSION
256+ if [[ $? -ne 0 ]]
257+ then
258+ echo "::error::Conda package version $PACKAGE_VERSION does not match Git tag ${{ github.ref_name }}"
259+ false
260+ fi
241261 - name : Install Miniforge
242262 uses : conda-incubator/setup-miniconda@v3
243263 with :
You can’t perform that action at this time.
0 commit comments