Skip to content

feat: allow npm for publish and install #142

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

Merged
merged 7 commits into from
Jul 23, 2025
Merged

feat: allow npm for publish and install #142

merged 7 commits into from
Jul 23, 2025

Conversation

mshanemc
Copy link
Contributor

some repos that use npm (jsforce, most of vscode ext) use npm, not yarn.

but they'd like to use the shared publish stuff.

@mshanemc mshanemc requested a review from a team as a code owner July 23, 2025 15:26
- name: Is published
id: is-published
run: |
RESPONSE=$(npm view .@$INPUTS_GITHUB_TAG version --json --silent || echo "Not published")
RESPONSE=$(npm view .@${{ inputs.githubTag }} version --json --silent || echo "Not published")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this back to use an env var? Looks like this needs to be reverted in several places. This is a convention we use to prevent RCE


- name: Validate package manager
run: |
if [[ "${{ inputs.packageManager }}" != "yarn" && "${{ inputs.packageManager }}" != "npm" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Move packageManager to an env var

jobs:
check-publish:
outputs:
published: ${{ steps.is-published.outputs.published }}
runs-on: ubuntu-latest
env:
INPUTS_GITHUB_TAG: ${{ inputs.githubTag }}
INPUTS_PACKAGE_MANAGER: ${{ inputs.packageManager }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, good idea to move these (non-secret envs) to the top level.

@mshanemc mshanemc merged commit fc9dec9 into main Jul 23, 2025
1 check passed
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