Skip to content

Commit 0b5cabf

Browse files
committed
edited cicd to change tag in the setup file
1 parent 3c10d9b commit 0b5cabf

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
with:
1919
python-version: '3.x'
2020

21+
- name: Extract version from Git tag
22+
id: get_version
23+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
24+
25+
- name: Replace version placeholder in setup.py
26+
run: sed -i "s/__VERSION__/$VERSION/g" setup.py
27+
2128
- name: Upgrade pip and install dependencies
2229
run: |
2330
python -m pip install --upgrade pip

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
setup(
77
name='unipyAccess',
8-
version='0.1',
8+
version='__VERSION__', # Placeholder for the version
99
packages=find_packages(),
1010
install_requires=[
1111
'requests==2.32.3'
1212
],
1313
long_description=long_description,
1414
long_description_content_type='text/markdown',
15-
)
15+
)

0 commit comments

Comments
 (0)