Skip to content

fix(ci): remove --provenance#242

Merged
ryoppippi merged 2 commits intomainfrom
fix-ci
Dec 15, 2025
Merged

fix(ci): remove --provenance#242
ryoppippi merged 2 commits intomainfrom
fix-ci

Conversation

@ryoppippi
Copy link
Copy Markdown
Contributor

@ryoppippi ryoppippi commented Dec 15, 2025

Summary by cubic

Switched the release workflow to pack with pnpm and publish the tarball with npm, removing --provenance to fix CI publish failures.

Written for commit c3f8462. Summary will update automatically on new commits.

Copilot AI review requested due to automatic review settings December 15, 2025 16:42
@ryoppippi ryoppippi requested a review from a team as a code owner December 15, 2025 16:42
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 15, 2025

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@242

commit: c3f8462

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@ryoppippi ryoppippi enabled auto-merge (squash) December 15, 2025 16:57
@ryoppippi ryoppippi merged commit 86f18bf into main Dec 15, 2025
11 checks passed
@ryoppippi ryoppippi deleted the fix-ci branch December 15, 2025 16:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the CI/CD release workflow to address issues with the --provenance flag during npm publishing. The changes switch from direct pnpm publish to a two-step process of packing and then publishing with npm, remove the problematic --provenance flag, and add Node.js to the Nix development environment.

Key changes:

  • Removed the preinstall script that enforced pnpm usage
  • Added nodejs_24 to the Nix development shell
  • Changed the release workflow to pack with pnpm and publish with npm, removing the --provenance flag

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
package.json Removed the preinstall script that enforced pnpm as the package manager
flake.nix Added nodejs_24 to the development environment buildInputs
.github/workflows/release.yaml Split publishing into separate pack and publish steps, switching from pnpm to npm and removing the --provenance flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"lint:oxlint": "oxlint --max-warnings=0 --type-aware --type-check",
"lint:knip": "knip",
"preinstall": "npx only-allow pnpm",
"prepack": "npm pkg delete scripts.preinstall && pnpm run build",
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prepack script references scripts.preinstall, which was just removed on the line above. This will cause the npm pkg delete command to fail silently or produce an error since it's trying to delete a non-existent script. Either remove the npm pkg delete scripts.preinstall part from this script or keep the preinstall script.

Suggested change
"prepack": "npm pkg delete scripts.preinstall && pnpm run build",
"prepack": "pnpm run build",

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +52
- name: 📦 Pack package
run: nix develop --command pnpm pack --no-git-checks

- name: 🚀 Publish package
run: nix develop --command pnpm publish --provenance --no-git-checks --access public
shell: bash
run: |
PACKAGE_TGZ=$(ls *.tgz | head -n 1)
echo "Publishing package: $PACKAGE_TGZ"
npm publish "$PACKAGE_TGZ" --access public
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow switches from using pnpm to npm for publishing. The pack step uses pnpm, but the publish step uses npm. This inconsistency could lead to confusion and potential issues. Consider using the same package manager for both operations, or document why different tools are being used. Additionally, the prepack script in package.json is designed to work with pnpm, so using npm publish directly on the tarball bypasses the package manager alignment.

Copilot uses AI. Check for mistakes.
run: |
PACKAGE_TGZ=$(ls *.tgz | head -n 1)
echo "Publishing package: $PACKAGE_TGZ"
npm publish "$PACKAGE_TGZ" --access public
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the --provenance flag eliminates npm's provenance attestation feature, which provides cryptographic verification of the package's origin and build process. This reduces supply chain security by removing the ability for consumers to verify that the published package was built in the expected CI environment. The id-token: write permission on line 28 suggests provenance was intentionally configured. If --provenance was removed due to errors, consider investigating and fixing the underlying issue rather than removing this security feature.

Suggested change
npm publish "$PACKAGE_TGZ" --access public
npm publish "$PACKAGE_TGZ" --access public --provenance

Copilot uses AI. Check for mistakes.
run: nix develop --command pnpm publish --provenance --no-git-checks --access public
shell: bash
run: |
PACKAGE_TGZ=$(ls *.tgz | head -n 1)
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command uses head -n 1 to select the first tarball, which could select an unexpected file if multiple .tgz files exist in the directory. Consider adding error handling to verify exactly one tarball exists, or use a more specific pattern like finding the tarball with the expected package name format.

Copilot uses AI. Check for mistakes.
ryoppippi added a commit that referenced this pull request Dec 15, 2025
ryoppippi added a commit that referenced this pull request Dec 15, 2025
* Revert "fix(ci): pack (#244)"

This reverts commit 21c4a45.

* Revert "fix(ci): remove --provenance (#242)"

This reverts commit 86f18bf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants