Skip to content

Commit a9bde4b

Browse files
committed
fix: version message
1 parent a42fd90 commit a9bde4b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/publish-to-dafni.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ jobs:
1919
run: |
2020
if [ "${{ github.event.workflow_run.conclusion }}" = "success" ]; then
2121
echo "The Causal Testing Framework has been published to PyPI"
22+
latest_tag=$(git describe --tags --abbrev=0)
23+
echo "Latest tag: $latest_tag"
24+
echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV
2225
else
2326
echo "The Causal Testing Framework has not been published to PyPI"
2427
fi
28+
2529
2630
2731
build_and_upload:
@@ -32,7 +36,6 @@ jobs:
3236
DAFNI_PARENT_ID: ${{ secrets.DAFNI_PARENT_ID }}
3337
DAFNI_USERNAME: ${{ secrets.DAFNI_USERNAME }}
3438
DAFNI_PASSWORD: ${{ secrets.DAFNI_PASSWORD }}
35-
CTF_VERSION: ${{ github.event.release.tag_name }}
3639

3740
steps:
3841
- uses: actions/checkout@v3
@@ -51,5 +54,5 @@ jobs:
5154
5255
- name: Upload to DAFNI
5356
run: |
54-
dafni upload model ./dafni/model_definition.yaml ctf-gh.tar.gz --version-message "Version ${{ env.CTF_VERSION }}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
57+
dafni upload model ./dafni/model_definition.yaml ctf-gh.tar.gz --version-message "Version {{ env.LATEST_TAG }}. Uploaded via Github." --parent-id ${DAFNI_PARENT_ID} -y
5558
dafni logout

0 commit comments

Comments
 (0)