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

Update publish to NPM script #96

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Update publish to NPM script #96

merged 2 commits into from
Apr 26, 2024

Conversation

nikrom17
Copy link
Contributor

Update the npm publish github action to release an alpha branch of the package if its not run off the repos main branch.

@nikrom17 nikrom17 requested a review from a team as a code owner April 26, 2024 20:06
Copy link
Contributor

@jshawl jshawl left a comment

Choose a reason for hiding this comment

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

two small comments (you should be able to run this locally without actually publishing to verify the difference between npm version ${1-patch} and npm version patch )

@@ -1,6 +1,6 @@
{
"name": "@paypal/common-components",
"version": "1.0.45",
"version": "1.0.46",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this version change won't cause a problem but might be good to back it out anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When running the npm publish github action off main I got this error: https://github.com/paypal/paypal-common-components/actions/runs/8853608567/job/24314849632

Will merging this PR, resolve that without manually bumping the version?

@@ -1,4 +1,22 @@
#!/bin/sh

# Running `npm version` will run through the other version lifecycle scripts
npm version ${1-patch};
Copy link
Contributor

Choose a reason for hiding this comment

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

what did ${1-patch} do?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think anything... 🤔

Screenshot 2024-04-26 at 15 31 49

Copy link
Contributor Author

Choose a reason for hiding this comment

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

${1-path} resolves to patch
The syntax seems to be doing some type of subsitution but it seems unnecessary.

Screenshot 2024-04-26 at 3 32 50 PM

@nikrom17 nikrom17 merged commit 5ea93af into main Apr 26, 2024
2 checks passed
@nikrom17 nikrom17 deleted the update-publish-script branch April 26, 2024 20:43
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