Skip to content

Commit 91b68bd

Browse files
authored
Merge pull request #147 from salesforcecli/sm/monorepo-npm-publishes
feat: monorepo publishing W-20054928
2 parents 5767bd4 + c83b35c commit 91b68bd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/actions/npmInstallWithRetries/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ inputs:
77
runs:
88
using: composite
99
steps:
10-
- name: npm install
10+
- name: timeout config
11+
run: npm config set fetch-timeout 600000
12+
shell: bash
13+
- name: npm ci
1114
uses: salesforcecli/github-workflows/.github/actions/retry@main
1215
with:
13-
command: npm install --timeout 600000 ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }}
16+
command: npm ci --no-audit --no-fund ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }}

.github/workflows/npmPublish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ on:
6161
required: false
6262
default: true
6363
type: boolean
64+
packagePath:
65+
description: relative path to the package to publish, should start with a ".". Defaults to the root of the repository. Useful for monorepos.
66+
required: false
67+
type: string
68+
default: .
69+
6470
jobs:
6571
check-publish:
6672
outputs:
@@ -96,6 +102,7 @@ jobs:
96102
fi
97103
env:
98104
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
105+
working-directory: ${{ inputs.packagePath }}
99106

100107
- run: echo "[INFO] Is package published:\ $STEPS_IS_PUBLISHED_PUBLISHED"
101108
env:
@@ -279,6 +286,7 @@ jobs:
279286
${{ inputs.dryrun && '--dryrun' || '' }} \
280287
${{ inputs.prerelease && format('--prerelease {0}', github.ref_name) || '' }} \
281288
${{ inputs.sign && '--sign' || '' }}
289+
working-directory: ${{ inputs.packagePath }}
282290
env:
283291
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
284292
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}

0 commit comments

Comments
 (0)