1616 required : false
1717 default : " 0.18.0"
1818 publish_package :
19- description : " Whether to publish a package to an npm registry"
19+ description : " Whether to publish a package from the root folder to an npm registry"
2020 required : true
2121 type : boolean
22+ publish_subpackages :
23+ description : " comma separated list of subpackage folders to publish to an npm registry"
24+ required : false
25+ type : string
26+ default : " "
2227 tag_format :
2328 description : " The tag format to use for the release tags"
2429 required : false
7075 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
7176 with :
7277 repository : NHSDigital/eps-common-workflows
78+ ref : AEA-6028
7379 sparse-checkout-cone-mode : false
7480 sparse-checkout : |
7581 package.json
@@ -230,7 +236,7 @@ jobs:
230236 name : config_artifact
231237
232238 - name : Cache asdf
233- if : ${{ inputs.publish_package }}
239+ if : inputs.publish_package || inputs.publish_subpackages != ''
234240 uses : actions/cache@v5
235241 with :
236242 path : |
@@ -240,15 +246,15 @@ jobs:
240246 ${{ runner.os }}-asdf-
241247
242248 - name : Install asdf dependencies in .tool-versions
243- if : ${{ inputs.publish_package }}
249+ if : inputs.publish_package || inputs.publish_subpackages != ''
244250 uses : asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
245251 with :
246252 asdf_version : ${{ inputs.asdfVersion }}
247253 env :
248254 PYTHON_CONFIGURE_OPTS : --enable-shared
249255
250256 - name : Install Dependencies and Build Package
251- if : ${{ inputs.publish_package }}
257+ if : inputs.publish_package || inputs.publish_subpackages != ''
252258 run : |
253259 make install
254260 make build
@@ -315,6 +321,7 @@ jobs:
315321 GITHUB_TOKEN : ${{ github.token }}
316322 BRANCH_NAME : ${{ inputs.branch_name }}
317323 PUBLISH_PACKAGE : ${{ inputs.publish_package }}
324+ PUBLISH_SUBPACKAGES : ${{ inputs.publish_subpackages }}
318325 TAG_FORMAT : ${{ inputs.tag_format }}
319326 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
320327 MAIN_BRANCH : ${{ inputs.main_branch }}
0 commit comments