Skip to content

Commit 194d00d

Browse files
Update publish.yml
Take a different approach with a completely new version
1 parent d948993 commit 194d00d

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,31 @@ jobs:
2020
python -m pip install --upgrade pip
2121
pip install build
2222
23-
- name: Clean previous builds
23+
- name: Debug environment
2424
run: |
25-
rm -rf dist/ build/ *.egg-info/
25+
echo "==== Current directory contents ===="
26+
ls -la
27+
echo "==== pyproject.toml content ===="
28+
cat pyproject.toml
29+
echo "==== Git information ===="
30+
git describe --tags || echo "No tags found"
31+
git rev-parse HEAD
2632
27-
- name: Force set version to 0.1.3
33+
- name: Clean and force version
2834
run: |
29-
# Update version in pyproject.toml
30-
sed -i 's/version = "0.1.2"/version = "0.1.3"/g' pyproject.toml
31-
# Also update any __version__ in Python files
32-
find . -name "*.py" -type f -exec sed -i 's/__version__ = "0.1.2"/__version__ = "0.1.3"/g' {} \;
33-
# Show the changes
34-
echo "Updated pyproject.toml version:"
35-
grep "version" pyproject.toml
36-
37-
- name: Build package
38-
run: python -m build
35+
rm -rf dist/ build/ *.egg-info/
36+
# Force the version directly before building
37+
sed -i 's/version = "0.[0-9].[0-9]"/version = "0.2.0"/g' pyproject.toml
38+
echo "==== Modified pyproject.toml ===="
39+
cat pyproject.toml
40+
41+
# Also check for any version in Python files
42+
find . -name "__init__.py" -type f -exec grep -l "__version__" {} \; | xargs -I{} sed -i 's/__version__ = "0.[0-9].[0-9]"/__version__ = "0.2.0"/g' {}
3943
40-
- name: Debug package files
44+
- name: Build package with verbose output
4145
run: |
42-
echo "Built distribution files:"
46+
python -m build --verbose
47+
echo "==== Built package contents ===="
4348
ls -la dist/
4449
4550
- name: Publish to PyPI

0 commit comments

Comments
 (0)