Skip to content

Commit 978c98e

Browse files
authored
fix: outputs
1 parent 0ff843d commit 978c98e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci_cd.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ jobs:
204204
library-version:
205205
name: Get library version
206206
runs-on: ubuntu-latest
207+
outputs:
208+
library_version: ${{ steps.version.outputs.library_version }}
207209
steps:
208210
- name: "Install Git and clone project"
209211
uses: actions/checkout@v4
@@ -220,18 +222,19 @@ jobs:
220222
python -m pip install -e .
221223
222224
- name: "Verify library is properly installed and get its version number"
225+
id: version
223226
shell: bash
224227
run: |
225228
library_name=${{ env.PACKAGE_NAME }}
226-
version=$(python -c "import importlib.metadata as importlib_metadata; print(importlib_metadata.version('$library_name'))")
229+
library_version=$(python -c "import importlib.metadata as importlib_metadata; print(importlib_metadata.version('$library_name'))")
227230
228-
if [ -z "$version" ]; then
231+
if [ -z "$library_version" ]; then
229232
echo "Problem getting the library version"
230233
exit 1;
231234
else
232-
echo "The library version is: $version";
235+
echo "The library version is: $library_version";
233236
fi;
234-
echo "library_version=$version" >> $GITHUB_OUTPUT
237+
echo "library_version=$library_version" >> $GITHUB_OUTPUT
235238
236239
pre-release:
237240
name: Pre-release project

0 commit comments

Comments
 (0)