Skip to content

Commit b43835f

Browse files
committed
fix(ci): enforce distribution name via pyproject.toml patching
1 parent db5e2bc commit b43835f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.releaserc.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ plugins:
3636
- files: [pyproject.toml] # optional: SemVer prerelease -> PEP440 ("1.2.3-rc.10" -> "1.2.3rc10" )
3737
from: '^version = "(\\d+\\.\\d+\\.\\d+)-(a|b|rc)\\.(\\d+)"'
3838
to: 'version = "\\1\\2\\3"'
39+
- - '@google/semantic-release-replace-plugin' # optional enforcement of distribution name
40+
- replacements:
41+
- files: [pyproject.toml] # optional: SemVer prerelease -> PEP440 ("1.2.3-dev.1" -> "1.2.3.dev1")
42+
from: ^name = ".*?"
43+
to: name = "${process.env.DISTRIBUTION_NAME}"
3944
- - '@semantic-release/git'
4045
- assets:
4146
- CHANGELOG.md
4247
- pyproject.toml
4348
- - '@semantic-release/exec'
4449
- prepareCmd: |
45-
poetry build --config-settings name="$DISTRIBUTION_NAME" && /bin/bash ./ci/scripts/patch_artifacts_if_distribution_name_is_altered.sh dist/*.whl dist/*.tar.gz
50+
poetry build && /bin/bash ./ci/scripts/patch_artifacts_if_distribution_name_is_altered.sh dist/*.whl dist/*.tar.gz
4651
- - '@semantic-release/github'
4752
- assets:
4853
- dist/*.whl

0 commit comments

Comments
 (0)