File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
.github/workflows/actions/publish-npm-package Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,18 @@ runs:
125125 npm publish --tag ${{ inputs.tag }} --access ${{ inputs.access }} $dry_run_option
126126
127127 - name : Promote package distribution tag to 'latest'
128- if : inputs.dry_run == 'false' && steps.check_version.outputs.deploy_mode == 'promote'
128+ if : steps.check_version.outputs.deploy_mode == 'promote'
129129 shell : bash
130130 working-directory : ${{ inputs.package_dir }}
131131 env :
132132 NODE_AUTH_TOKEN : ${{ inputs.api_token }}
133133 run : |
134134 echo "Promote '${{ steps.prepare.outputs.package_name }}' package version '${{ steps.prepare.outputs.package_local_version }}' from 'next' to 'latest'"
135- npm whoami
136- npm dist-tag add ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} latest
137- npm dist-tag rm ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} next
135+ if [ "${{ inputs.dry_run }}" == "false" ]; then
136+ npm whoami
137+ npm dist-tag add ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} latest
138+ npm dist-tag rm ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} next
139+ else
140+ echo "Dry run: npm dist-tag add ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} latest
141+ echo "Dry run: npm dist-tag rm ${{ steps.prepare.outputs.package_name }}"@${{ steps.prepare.outputs.package_local_version }} next
142+ fi
You can’t perform that action at this time.
0 commit comments