4343 if not re.match(r'^[0-9]+\.[0-9]+\.[0-9]+$', tag):
4444 print(f'::error::Tag {tag} does not match the expected x.y.z pattern.')
4545 with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
46- f.write(f'version=0.1.8 \n')
46+ f.write(f'version=0.1.9 \n')
4747 EOF
4848 - name : Update Python project version
4949 env :
@@ -53,11 +53,16 @@ jobs:
5353 python - <<'EOF'
5454 import os, pathlib, re
5555 version = os.environ['RELEASE_VERSION']
56- p = pathlib.Path('pyproject.toml')
57- text = p.read_text()
56+
57+ pyproject = pathlib.Path('pyproject.toml')
58+ text = pyproject.read_text()
5859 text = re.sub(r'(?m)^version = ".*"$', f'version = "{version}"', text)
5960 text = re.sub(r'(?m)^dynamic = \["version"\]\n?', '', text)
60- p.write_text(text)
61+ pyproject.write_text(text)
62+
63+ cargo = pathlib.Path('rust/Cargo.toml')
64+ text = cargo.read_text()
65+ cargo.write_text(re.sub(r'(?m)^version = ".*"$', f'version = "{version}"', text, count=1))
6166 EOF
6267 - name : Build wheels
6368 run : maturin build --release -i python${{ matrix.python-version }}
6974 rm rust/target/wheels/*-linux_*
7075 fi
7176 ls -l rust/target/wheels/
72- twine upload -r testpypi -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} rust/target/wheels/*
77+ twine upload -r testpypi -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} rust/target/wheels/*
0 commit comments