Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [ main ]
workflow_dispatch: # Allows manual triggering

# Required permissions for the workflow to function properly
permissions:
contents: write # Needed to push version bump commit and tags

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -32,15 +36,18 @@ jobs:
- name: Bump version
id: version_bump
run: |
# Extract current version from pyproject.toml
CURRENT_VERSION=$(awk -F'"' '/^version =/ {print $4}' pyproject.toml)
# Extract current version from pyproject.toml - more robust pattern
CURRENT_VERSION=$(grep -o 'version = "[0-9]*\.[0-9]*\.[0-9]*"' pyproject.toml | grep -o '[0-9]*\.[0-9]*\.[0-9]*')
# Trim any whitespace
CURRENT_VERSION=$(echo "$CURRENT_VERSION" | xargs)
echo "Current version: '$CURRENT_VERSION'"

# Validate version format
if [[ ! "$CURRENT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid version format: $CURRENT_VERSION"
cat pyproject.toml # Debug: print the file contents
echo "---"
grep "version" pyproject.toml # Debug: check for version line
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "datafast"
version = "0.0.9"
version = "0.0.10"
description = "A Python package for synthetic text dataset generation"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
Loading