Skip to content

Commit

Permalink
fix: outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue authored Feb 1, 2024
1 parent 0ff843d commit 978c98e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ jobs:
library-version:
name: Get library version
runs-on: ubuntu-latest
outputs:
library_version: ${{ steps.version.outputs.library_version }}
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4
Expand All @@ -220,18 +222,19 @@ jobs:
python -m pip install -e .
- name: "Verify library is properly installed and get its version number"
id: version
shell: bash
run: |
library_name=${{ env.PACKAGE_NAME }}
version=$(python -c "import importlib.metadata as importlib_metadata; print(importlib_metadata.version('$library_name'))")
library_version=$(python -c "import importlib.metadata as importlib_metadata; print(importlib_metadata.version('$library_name'))")
if [ -z "$version" ]; then
if [ -z "$library_version" ]; then
echo "Problem getting the library version"
exit 1;
else
echo "The library version is: $version";
echo "The library version is: $library_version";
fi;
echo "library_version=$version" >> $GITHUB_OUTPUT
echo "library_version=$library_version" >> $GITHUB_OUTPUT
pre-release:
name: Pre-release project
Expand Down

0 comments on commit 978c98e

Please sign in to comment.