-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
.github/workflows/npmPublish.yml
Outdated
- 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") |
There was a problem hiding this comment.
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
.github/workflows/npmPublish.yml
Outdated
|
||
- name: Validate package manager | ||
run: | | ||
if [[ "${{ inputs.packageManager }}" != "yarn" && "${{ inputs.packageManager }}" != "npm" ]]; then |
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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.
some repos that use npm (jsforce, most of vscode ext) use npm, not yarn.
but they'd like to use the shared publish stuff.