@@ -8,48 +8,53 @@ inputs:
88 tag :
99 description : ' The tag to publish to on NPM.'
1010 preid :
11- description : ' The prerelease identifier used when doing a prerelease. '
11+ description : " Prerelease identifier such as 'alpha', 'beta', 'rc', or 'next'. Leave blank to skip prerelease tagging. "
1212 working-directory :
1313 description : ' The directory of the package.'
1414 folder :
1515 default : ' ./'
1616 description : ' A folder containing a package.json file.'
17- token :
18- description : ' The NPM authentication token required to publish.'
17+ node-version :
18+ description : ' Node.js version to use when publishing.'
19+ required : false
20+ default : ' 24.x'
1921runs :
2022 using : ' composite'
2123 steps :
22- - uses : actions/setup-node@v6
24+ - name : 🟢 Configure Node for Publish
25+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2326 with :
24- node-version : 24.x
27+ node-version : ${{ inputs.node-version }}
28+ registry-url : ' https://registry.npmjs.org'
29+ scope : ' @ionic'
2530 # Provenance requires npm 9.5.0+
26- - name : Install latest npm
31+ - name : 📦 Install latest npm
2732 run : npm install -g npm@latest
2833 shell : bash
2934 # This ensures the local version of Lerna is installed
3035 # and that we do not use the global Lerna version
31- - name : Install root dependencies
36+ - name : 🕸️ Install root dependencies
3237 run : npm ci
3338 shell : bash
34- - name : Install Dependencies
39+ - name : 📦 Install Dependencies
3540 run : npx lerna@5 bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps
3641 shell : bash
3742 working-directory : ${{ inputs.working-directory }}
38- - name : Update Version
39- run : npx lerna@5 version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
43+ - name : 🏷️ Set Version
44+ run : |
45+ if [ -z "${{ inputs.preid }}" ]; then
46+ npx lerna@5 version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version
47+ else
48+ npx lerna@5 version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
49+ fi
4050 shell : bash
4151 working-directory : ${{ inputs.working-directory }}
42- - name : Run Build
52+ - name : 🏗️ Run Build
4353 run : npm run build
4454 shell : bash
4555 working-directory : ${{ inputs.working-directory }}
46- - name : Prepare NPM Token
47- run : echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
48- working-directory : ${{ inputs.working-directory }}
49- shell : bash
50- env :
51- NPM_TOKEN : ${{ inputs.token }}
52- - name : Publish to NPM
56+ - name : 🚀 Publish to NPM
5357 run : npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
5458 shell : bash
5559 working-directory : ${{ inputs.working-directory }}
60+
0 commit comments