Skip to content

Commit 8cecdf8

Browse files
committed
trusted publishing
1 parent 63eb1a3 commit 8cecdf8

File tree

5 files changed

+10
-27
lines changed

5 files changed

+10
-27
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cdk, JsonPatch } from "projen";
1+
import { cdk } from "projen";
22
import { JsiiProjectOptions } from "projen/lib/cdk";
33
import { NpmAccess } from "projen/lib/javascript";
44
import { MergeQueue } from "./projenrc/merge-queue";
@@ -32,8 +32,9 @@ const project = new cdk.JsiiProject({
3232
},
3333
releaseEnvironment: "npm",
3434
npmAccess: NpmAccess.PUBLIC,
35+
npmTrustedPublishing: true,
3536
publishToPypi: {
36-
// trustedPublishing: true,
37+
trustedPublishing: true,
3738
distName: "projen.canary-package",
3839
module: "projen.canary_package",
3940
githubEnvironment: "release",
@@ -53,24 +54,6 @@ new MergeQueue(project, {
5354
},
5455
});
5556

56-
// remove npm token
57-
project.github?.tryFindWorkflow("release")?.file?.patch(
58-
JsonPatch.remove("/jobs/release_npm/steps/9/env/NPM_TOKEN"),
59-
JsonPatch.add("/jobs/release_npm/steps/9/env/NPM_TRUSTED_PUBLISHER", "true"),
60-
JsonPatch.replace(
61-
"/jobs/release_npm/steps/9/run",
62-
"npx -p github:cdklabs/publib#mrgrain-patch-1 publib-npm",
63-
),
64-
65-
JsonPatch.replace("/jobs/release_pypi/steps/10/env", {
66-
PYPI_TRUSTED_PUBLISHER: "true",
67-
}),
68-
JsonPatch.replace(
69-
"/jobs/release_pypi/steps/10/run",
70-
"npx -p github:cdklabs/publib#mrgrain-patch-1 publib-pypi",
71-
),
72-
);
73-
7457
// fix java version
7558
// const javaVersion = "11";
7659
// project.github?.tryFindWorkflow("build")?.file?.patch(

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/projen-0.95.1008.jsii.tgz

2.81 MB
Binary file not shown.

yarn.lock

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)