Skip to content

Commit 741d671

Browse files
author
akashjavelin
committed
devops: updated pr-check.yaml yaml for adding build
1 parent 9f020a4 commit 741d671

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,22 @@ jobs:
162162
with:
163163
persist-credentials: false
164164

165+
- name: Setting up the Package Version
166+
env:
167+
PY_VER_FILE: "pyproject.toml"
168+
RELEASE_NAME: ${{ github.event.release.name }}
169+
shell: bash
170+
run: |-
171+
export RELEASE_VERSION=$(echo ${{ env.RELEASE_NAME }} | sed 's|^v||g')
172+
if cat ${{ env.PY_VER_FILE }} | grep 'version = "RELEASE_VERSION"' ; then
173+
sed -i "s|^version = \"RELEASE_VERSION\"|version = \"${RELEASE_VERSION}\"|g" ${{ env.PY_VER_FILE }}
174+
cat ${file}
175+
else
176+
echo "Version entry format is wrong in the ${{ env.PY_VER_FILE }} file...!"
177+
cat ${file}
178+
exit 1
179+
fi
180+
165181
- name: Setup Python
166182
uses: actions/setup-python@v5
167183
with:

0 commit comments

Comments
 (0)