Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/actions/npmInstallWithRetries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ inputs:
runs:
using: composite
steps:
- name: npm install
- name: timeout config
run: npm config set fetch-timeout 600000
shell: bash
- name: npm ci
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
command: npm install --timeout 600000 ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }}
command: npm ci --no-audit --no-fund ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }}
10 changes: 9 additions & 1 deletion .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ on:
required: false
default: true
type: boolean
packagePath:
description: relative path to the package to publish, should start with a ".". Defaults to the root of the repository. Useful for monorepos.
required: false
type: string
default: .

jobs:
check-publish:
outputs:
Expand Down Expand Up @@ -96,6 +102,7 @@ jobs:
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: ${{ inputs.packagePath }}

- run: echo "[INFO] Is package published:\ $STEPS_IS_PUBLISHED_PUBLISHED"
env:
Expand Down Expand Up @@ -137,7 +144,7 @@ jobs:
uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Install dependencies with npm
if: inputs.packageManager == 'npm'
uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main
uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@sm/monorepo-npm-publishes
- name: Vulnerability check
if: inputs.vulnerabilityCheck
# Temporary check for known vulnerable packages from the following supply chain attacks:
Expand Down Expand Up @@ -279,6 +286,7 @@ jobs:
${{ inputs.dryrun && '--dryrun' || '' }} \
${{ inputs.prerelease && format('--prerelease {0}', github.ref_name) || '' }} \
${{ inputs.sign && '--sign' || '' }}
working-directory: ${{ inputs.packagePath }}
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
Expand Down