Skip to content

Commit

Permalink
Merge pull request #7 from deepgram/sr/setting-up-release
Browse files Browse the repository at this point in the history
adding version update on release
  • Loading branch information
SandraRodgers authored Nov 7, 2023
2 parents b762cb4 + d6b9835 commit 570b102
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build
- name: Update VERSION in setup.py
run: |
# Determine the new version from the release tag (e.g., "v1.2.3")
NEW_VERSION=$(echo "${{ github.ref }}" | sed 's/^refs\/tags\///')
# Update the setup.py file with the new version
sed -i "s/VERSION = .*/VERSION = \"$NEW_VERSION\"/" setup.py
- name: Update Version in _version.py
run: sed -i "s/0.0.0/${{ github.event.release.tag_name }}/g" ./deepgram_captions/_version.py
- name: Build package
run: python -m build
- name: Install twine
Expand Down
1 change: 1 addition & 0 deletions deepgram_captions/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.0'
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from setuptools import setup, find_packages
import os.path

with open("README.md", "r", encoding="utf-8") as fh:
LONG_DESCRIPTION = fh.read()

VERSION = "0.0.2"
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'deepgram_captions', '_version.py'), encoding="utf8") as file:
exec(file.read())
# imports as __version__

DESCRIPTION = "A Python package for generating captions."

setup(
name="deepgram-captions",
version=VERSION,
version=__version__,
author="Deepgram",
author_email="[email protected]",
url="https://github.com/deepgram/deepgram-python-captions",
Expand Down

0 comments on commit 570b102

Please sign in to comment.