Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,21 @@ jobs:
- name: Show what will be published
# `npm publish --dry-run` lists the exact files going into the tarball
# and prints the tarball SHA — gives auditors a verifiable trail.
run: npm publish --dry-run --tag ${{ steps.disttag.outputs.tag }}
#
# IDEMPOTENT like the publish step below: npm refuses even a dry run for a version
# already on the registry, which made a rerun after a partial release die here
# before reaching the GitHub-release recovery steps.
env:
DIST_TAG: ${{ steps.disttag.outputs.tag }}
run: |
set -euo pipefail
name="$(node -p "require('./package.json').name")"
version="$(node -p "require('./package.json').version")"
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "· $name@$version already on npm, skipping dry run"
exit 0
fi
npm publish --dry-run --tag "$DIST_TAG"

- name: Publish to npm with provenance
# No NODE_AUTH_TOKEN: the credential comes from this job's OIDC identity, exchanged
Expand Down
2 changes: 1 addition & 1 deletion src/check-secrets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe("checkSecrets - dotenvx source", () => {
} finally {
if (previousPath === undefined) delete process.env.PATH;
else process.env.PATH = previousPath;
await rm(project, { recursive: true, force: true });
await rm(project, { recursive: true, force: true, maxRetries: 10, retryDelay: 200 });
}
});
});
Loading