Skip to content

Commit 7df4b03

Browse files
authored
ci: add dry run steps to fail before running git operations
1 parent 53c344d commit 7df4b03

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

.github/workflows/release.yaml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ jobs:
5858
- name: Build
5959
run: yarn ci:releasebuild
6060

61+
- name: Dry Run
62+
run: |
63+
yarn lerna version ${{ github.event.inputs.new_version || '' }} \
64+
--conventional-graduate \
65+
--force-conventional-graduate \
66+
--yes \
67+
--exact \
68+
--dry-run
69+
70+
yarn lerna publish --dry-run
71+
6172
- name: Version Bump
6273
env:
6374
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
@@ -142,13 +153,29 @@ jobs:
142153
- name: Build
143154
run: yarn ci:releasebuild
144155

156+
- name: Dry Run
157+
run: |
158+
yarn lerna version \
159+
--conventional-prerelease \
160+
--force-publish \
161+
--yes \
162+
--exact \
163+
--dry-run
164+
165+
yarn lerna publish --dry-run
166+
145167
- name: Version Bump
146168
env:
147169
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
148170
run: |
149171
git config user.name "${{ secrets.UI5_WEBCOMP_BOT_NAME }}"
150172
git config user.email "${{ secrets.UI5_WEBCOMP_BOT_EMAIL }}"
151-
yarn lerna version --conventional-prerelease --force-publish --yes --exact --create-release github
173+
yarn lerna version \
174+
--conventional-prerelease \
175+
--force-publish \
176+
--yes \
177+
--exact \
178+
--create-release github
152179
153180
- name: Publish
154181
run: |
@@ -205,13 +232,29 @@ jobs:
205232
- name: Build
206233
run: yarn ci:releasebuild
207234

235+
- name: Dry Run
236+
run: |
237+
yarn lerna version ${{ github.event.inputs.new_version || '' }} \
238+
--conventional-graduate \
239+
--force-conventional-graduate \
240+
--yes \
241+
--exact \
242+
--dry-run
243+
244+
yarn lerna publish --dry-run
245+
208246
- name: Version Bump
209247
env:
210248
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
211249
run: |
212250
git config user.name "${{ secrets.UI5_WEBCOMP_BOT_NAME }}"
213251
git config user.email "${{ secrets.UI5_WEBCOMP_BOT_EMAIL }}"
214-
yarn lerna version ${{ github.event.inputs.new_version || '' }} --conventional-graduate --force-conventional-graduate --yes --exact --create-release github
252+
yarn lerna version ${{ github.event.inputs.new_version || '' }} \
253+
--conventional-graduate \
254+
--force-conventional-graduate \
255+
--yes \
256+
--exact \
257+
--create-release github
215258
216259
- name: Publish
217260
run: yarn lerna publish from-git --yes --dist-tag ${{ github.event.inputs.npm_tag || 'sf' }}

0 commit comments

Comments
 (0)