Skip to content
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

fix: added .npmignore file so dist is added in npm release #22

Merged
merged 4 commits into from
May 9, 2024

Conversation

abdullahwaheed
Copy link
Contributor

No description provided.

Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

Approved, but I would recommend continuing to include now-removed @semantic-release/github step to ensure GitHub releases are created during the release.yml workflow before merging.

{
"path": "@semantic-release/github",
Copy link
Member

Choose a reason for hiding this comment

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

This is removing @semantic-release/github, but I believe we would still want this condition. Related to verifyConditions, including @semantic-release/github here ensures the "precense and validity of the authentication [with GitHub]".

Subsequently, when @semantic-release/github is used within publish below, it ensures a GitHub release is created in the repository.

Note, the assets.path configuration currently used with @semantic-release/github can likely stay, pointing to dist. It controls which files are included in a release's archive files (e.g., see "Assets" on the GitHub release for the recently published v4).

@abdullahwaheed abdullahwaheed merged commit 97ee3b8 into master May 9, 2024
5 checks passed
@adamstankiewicz
Copy link
Member

adamstankiewicz commented May 9, 2024

@abdullahwaheed Looks like this PR was reverted because the release workflow failed with the following error:

[9:46:23 AM] [semantic-release] › ✘  ENOPKG Missing `package.json` file.
A package.json file (https://docs.npmjs.com/files/package.json) at the root of your project is required to release on npm.

FWIW, this may likely have resulted due to the removal of the /* from the assets path; I would have left that assets config unchanged. Per the documentation, the assets config accepts Glob patterns, which requires the /* to exist.

For example, using a Glob string tester tool:

Without /* in assets

image

With /* in assets

image

Note how the test strings do NOT match without /*. As a result, the @semantic-release/github plugin did not find package.json because the Glob pattern didn't match the files contained within dist without /* included.

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.

2 participants