@@ -105,7 +105,9 @@ jobs:
105105 - name : Build clean release distributions
106106 run : |
107107 rm -rf dist /tmp/openstatspec-release-dists
108- mkdir -p dist /tmp/openstatspec-release-dists/openstatspec /tmp/openstatspec-release-dists/specification
108+ mkdir -p dist/openstatspec dist/openstatspec-specification \
109+ /tmp/openstatspec-release-dists/openstatspec \
110+ /tmp/openstatspec-release-dists/specification
109111 python -m build --outdir /tmp/openstatspec-release-dists/openstatspec .
110112 python -m build --outdir /tmp/openstatspec-release-dists/specification "$OPENSTATSPEC_SPECIFICATION_PACKAGE_DIR"
111113 python -m twine check \
@@ -116,11 +118,18 @@ jobs:
116118 from shutil import copy2
117119
118120 sources = {
119- "openstatspec": Path("/tmp/openstatspec-release-dists/openstatspec"),
120- "openstatspec_specification": Path("/tmp/openstatspec-release-dists/specification"),
121+ "openstatspec": (
122+ Path("/tmp/openstatspec-release-dists/openstatspec"),
123+ Path("dist/openstatspec"),
124+ ),
125+ "openstatspec_specification": (
126+ Path("/tmp/openstatspec-release-dists/specification"),
127+ Path("dist/openstatspec-specification"),
128+ ),
121129 }
122130 copied = []
123- for normalized_name, source in sources.items():
131+ for normalized_name, (source, destination_dir) in sources.items():
132+ destination_dir.mkdir(parents=True, exist_ok=True)
124133 files = sorted(path for path in source.iterdir() if path.is_file())
125134 if len(files) != 2 or {path.suffix for path in files} != {".whl", ".gz"}:
126135 raise SystemExit(
@@ -133,7 +142,7 @@ jobs:
133142 raise SystemExit(
134143 f"unexpected artifact name for {normalized_name}: {path.name}"
135144 )
136- destination = Path("dist") / path.name
145+ destination = destination_dir / path.name
137146 copy2(path, destination)
138147 copied.append(destination)
139148 if len(copied) != 4:
@@ -151,12 +160,12 @@ jobs:
151160 - run : python -m pytest -m "not services"
152161 - run : python -m venv /tmp/openstatspec-release-smoke
153162 - run : /tmp/openstatspec-release-smoke/bin/python -m pip install ./openstatspec-pyspssio
154- - run : /tmp/openstatspec-release-smoke/bin/python -m pip install dist/openstatspec-*.whl
163+ - run : /tmp/openstatspec-release-smoke/bin/python -m pip install dist/openstatspec/openstatspec -*.whl
155164 - run : /tmp/openstatspec-release-smoke/bin/openstatspec capabilities
156165 - name : Smoke-test specification wheel
157166 run : |
158167 python -m venv /tmp/openstatspec-specification-release-smoke
159- /tmp/openstatspec-specification-release-smoke/bin/python -m pip install dist/openstatspec_specification-*.whl
168+ /tmp/openstatspec-specification-release-smoke/bin/python -m pip install dist/openstatspec-specification/ openstatspec_specification-*.whl
160169 /tmp/openstatspec-specification-release-smoke/bin/python - <<'PY'
161170 from openstatspec_specification import DoltDeclarationSource
162171
@@ -183,6 +192,13 @@ jobs:
183192 with :
184193 name : python-distributions
185194 path : dist/
186- - uses : pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
195+ - name : Publish openstatspec to PyPI
196+ uses : pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
187197 with :
198+ packages-dir : dist/openstatspec/
199+ skip-existing : true
200+ - name : Publish openstatspec-specification to PyPI
201+ uses : pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
202+ with :
203+ packages-dir : dist/openstatspec-specification/
188204 skip-existing : true
0 commit comments