Repository navigation
ci: harden the npm publish path #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8be5192
d854695
be15fb8
26183ad
2c6fa52
a6b7639
2a3740e
bfa3971
d06c7f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| name: npm publish | ||
|
|
||
| permissions: | ||
| id-token: write # Required for OIDC | ||
| contents: read | ||
| on: | ||
| release: | ||
|
|
@@ -21,6 +20,13 @@ env: | |
| jobs: | ||
| npm-publish: | ||
| runs-on: ubuntu-latest | ||
| # A repository admin sets the required reviewers of this environment. The | ||
| # job then waits for one of them to approve before it can publish. The | ||
| # reviewer checks that the release tag is on main or v1.x. | ||
| environment: npm-publish | ||
|
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codex AI review · Finding [P1] Bind the approved release to the checkout commit. The new gate asks reviewers to check the release tag, but checkout still receives the unqualified To suppress repeats, reply |
||
| permissions: | ||
| id-token: write # Required for OIDC | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
|
|
@@ -29,9 +35,18 @@ jobs: | |
| with: | ||
| node-version: 24 | ||
| registry-url: https://registry.npmjs.org/ | ||
| - run: npm ci | ||
| # Skip the install scripts of dependencies. This job can publish to npm, so | ||
| # it must not run third-party code that the build does not need. The | ||
| # build and the tests pass without those scripts. | ||
| - run: npm ci --ignore-scripts | ||
| - run: npm run build | ||
| - run: npm run test | ||
| # The same package checks that run on every pull request. They catch a | ||
| # tarball that misses a declared file or has wrong type resolution. | ||
| - name: Verify every package ships the files its package.json declares | ||
| run: node .github/workflows/scripts/test-publish/verify-declared-files-shipped.mjs | ||
| - name: Check the core package with attw and publint | ||
|
ParidelPooya marked this conversation as resolved.
Resolved
|
||
| run: npm run check:package -w packages/aws-durable-execution-sdk-js | ||
| - name: Make script executable | ||
| run: chmod +x ./.github/workflows/iterate-publish-npm.sh | ||
| - name: iterate and publish | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.