Skip to content

Commit 5eb20b3

Browse files
authored
[ci] Fix --dry not being passed correctly (facebook#32489)
Boolean params for dry runs are true if the param exists at all, so only add it if we're in dry run mode.
1 parent 4c9392b commit 5eb20b3

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

.github/workflows/runtime_releases_from_npm_manual.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
embed-author-name: ${{ github.event.sender.login }}
5151
embed-author-url: ${{ github.event.sender.html_url }}
5252
embed-author-icon-url: ${{ github.event.sender.avatar_url }}
53-
embed-title: '⚠️ Publishing release from NPM'
53+
embed-title: "⚠️ Publishing release from NPM${{ inputs.dry && ' (dry run)' }}"
5454
embed-description: |
5555
```json
5656
${{ toJson(inputs) }}
@@ -80,44 +80,40 @@ jobs:
8080
working-directory: scripts/release
8181
- run: cp ./scripts/release/ci-npmrc ~/.npmrc
8282
- if: '${{ inputs.only_packages }}'
83-
name: 'Prepare and publish ${{ inputs.only_packages }}'
83+
name: 'Prepare ${{ inputs.only_packages }} from NPM'
8484
run: |
85-
echo -e "===== Preparing release from NPM =====\n"
8685
scripts/release/prepare-release-from-npm.js \
8786
--ci \
8887
--skipTests \
8988
--version=${{ inputs.version_to_promote }} \
9089
--publishVersion=${{ inputs.version_to_publish }} \
9190
--onlyPackages=${{ inputs.only_packages }}
92-
93-
echo -e "\n\n===== Check prepared files =====\n"
94-
ls -R build/node_modules
95-
96-
echo -e "\n\n===== Publishing to NPM =====\n"
97-
scripts/release/publish.js \
98-
--ci \
99-
--tags=${{ inputs.tags }} \
100-
--publishVersion=${{ inputs.version_to_publish }} \
101-
--onlyPackages=${{ inputs.only_packages }} \
102-
--dry=${{ inputs.dry }}
10391
- if: '${{ inputs.skip_packages }}'
104-
name: 'Prepare and publish all packages EXCEPT ${{ inputs.skip_packages }}'
92+
name: 'Prepare all packages EXCEPT ${{ inputs.skip_packages }} from NPM'
10593
run: |
106-
echo -e "===== Preparing release from NPM =====\n"
10794
scripts/release/prepare-release-from-npm.js \
10895
--ci \
10996
--skipTests \
11097
--version=${{ inputs.version_to_promote }} \
11198
--publishVersion=${{ inputs.version_to_publish }} \
11299
--skipPackages=${{ inputs.skip_packages }}
113-
114-
echo -e "\n\n===== Check prepared files =====\n"
115-
ls -R build/node_modules
116-
117-
echo -e "\n\n===== Publishing to NPM =====\n"
100+
- name: Check prepared files
101+
run: ls -R build/node_modules
102+
- if: '${{ inputs.only_packages }}'
103+
name: 'Publish ${{ inputs.only_packages }}'
104+
run: |
105+
scripts/release/publish.js \
106+
--ci \
107+
--tags=${{ inputs.tags }} \
108+
--publishVersion=${{ inputs.version_to_publish }} \
109+
--onlyPackages=${{ inputs.only_packages }} ${{ (inputs.dry && '') || '\'}}
110+
${{ inputs.dry && '--dry'}}
111+
- if: '${{ inputs.skip_packages }}'
112+
name: 'Publish all packages EXCEPT ${{ inputs.skip_packages }}'
113+
run: |
118114
scripts/release/publish.js \
119115
--ci \
120116
--tags=${{ inputs.tags }} \
121117
--publishVersion=${{ inputs.version_to_publish }} \
122-
--skipPackages=${{ inputs.skip_packages }} \
123-
--dry=${{ inputs.dry }}
118+
--skipPackages=${{ inputs.skip_packages }} ${{ (inputs.dry && '') || '\'}}
119+
${{ inputs.dry && '--dry'}}

0 commit comments

Comments
 (0)