File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 7
7
runs-on : ubuntu-latest
8
8
steps :
9
9
- uses : actions/checkout@v4
10
+ with :
11
+ fetch-depth : 0
10
12
11
13
- name : Set up Python
12
14
uses : actions/setup-python@v4
13
15
with :
14
16
python-version : ' 3.12'
15
- cache : ' pip'
16
- cache-dependency-path : ' .github/workflows/publish.yml'
17
17
18
18
- name : Install dependencies
19
19
run : |
@@ -24,20 +24,23 @@ jobs:
24
24
run : |
25
25
rm -rf dist/ build/ *.egg-info/
26
26
27
- - name : Verify version before build
27
+ - name : Force set version to 0.1.3
28
28
run : |
29
- echo "==== pyproject.toml version ===="
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:"
30
35
grep "version" pyproject.toml
31
36
32
37
- name : Build package
33
38
run : python -m build
34
39
35
- - name : Debug package version
40
+ - name : Debug package files
36
41
run : |
37
- echo "==== Built distribution files ==== "
42
+ echo "Built distribution files: "
38
43
ls -la dist/
39
- echo "==== Checking tarball contents ===="
40
- tar -tzf dist/*.tar.gz | grep -E 'version|VERSION'
41
44
42
45
- name : Publish to PyPI
43
46
uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments