@dbx-tools/projen 0.6.81 → 0.6.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -273,6 +273,11 @@ Use `--local-registry false` or `--local-pypi false` to disable either local
273
273
  publish. An explicit `--local-pypi http://localhost:3141/user/index/` overrides
274
274
  auto-detection; `--python-root` defaults to `packages/py`.
275
275
 
276
+ The pushed `v*` tag is also the public release boundary: it triggers npm
277
+ publishing, stamps and publishes every Python distribution to PyPI, and rebuilds
278
+ and deploys the documentation site. Ordinary pushes to `main` publish none of
279
+ those surfaces.
280
+
276
281
  Members intentionally keep only the tasks that something OTHER than a human
277
282
  invokes, so there is no second place to run the same thing:
278
283
 
package/package.json CHANGED
@@ -26,9 +26,9 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@clack/prompts": "^1.7.0",
29
- "@dbx-tools/core": "0.6.81",
30
- "@dbx-tools/path": "0.6.81",
31
- "@dbx-tools/shared-core": "0.6.81",
29
+ "@dbx-tools/core": "0.6.82",
30
+ "@dbx-tools/path": "0.6.82",
31
+ "@dbx-tools/shared-core": "0.6.82",
32
32
  "commander": "^15.0.0",
33
33
  "concurrently": "^10.0.3",
34
34
  "constructs": "^10.6.0",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "main": "index.ts",
49
49
  "license": "Apache-2.0",
50
- "version": "0.6.81",
50
+ "version": "0.6.82",
51
51
  "types": "index.ts",
52
52
  "type": "module",
53
53
  "exports": {
package/src/project-py.ts CHANGED
@@ -279,7 +279,7 @@ export class DBXToolsPythonWorkspace extends Component {
279
279
  if (!project.github) return;
280
280
  const workflow = new GithubWorkflow(project.github, options.workflowName ?? "python-release");
281
281
  workflow.file?.addOverride("permissions", { contents: "read" });
282
- workflow.on({ workflowDispatch: {} });
282
+ workflow.on({ push: { tags: ["v*"] }, workflowDispatch: {} });
283
283
  workflow.file?.addOverride("on.workflow_dispatch", {
284
284
  inputs: {
285
285
  version: {
@@ -287,11 +287,6 @@ export class DBXToolsPythonWorkspace extends Component {
287
287
  type: "string",
288
288
  required: true,
289
289
  },
290
- publish: {
291
- description: "Upload the validated distributions to PyPI",
292
- type: "boolean",
293
- default: false,
294
- },
295
290
  },
296
291
  });
297
292
  workflow.addJob("build", {
@@ -303,7 +298,9 @@ export class DBXToolsPythonWorkspace extends Component {
303
298
  { name: "Setup uv", uses: "astral-sh/setup-uv@v7" },
304
299
  {
305
300
  name: "Stamp workspace versions",
306
- env: { VERSION: "${{ inputs.version }}" },
301
+ env: {
302
+ VERSION: "${{ github.event_name == 'push' && github.ref_name || inputs.version }}",
303
+ },
307
304
  run: this.renderVersionStampScript(),
308
305
  },
309
306
  {
@@ -331,7 +328,7 @@ export class DBXToolsPythonWorkspace extends Component {
331
328
  });
332
329
  for (const pkg of this.packages) {
333
330
  workflow.addJob(`publish-${pkg.packageOptions.directory}`, {
334
- if: "${{ inputs.publish }}",
331
+ if: "${{ github.event_name == 'push' }}",
335
332
  needs: ["build"],
336
333
  environment: {
337
334
  name:
@@ -367,7 +364,7 @@ export class DBXToolsPythonWorkspace extends Component {
367
364
  "import os",
368
365
  "import re",
369
366
  "",
370
- 'version = os.environ["VERSION"]',
367
+ 'version = os.environ["VERSION"].removeprefix("v")',
371
368
  `package_files = sorted(Path(${quote(this.repository.root)}).glob("*/pyproject.toml"))`,
372
369
  "packages = {}",
373
370
  "for path in package_files:",