Skip to content

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
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

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.

3 participants