Skip to content

Commit 4c6a83f

Browse files
committed
refactor(gh actions): add a step to reset working directory before lerna version
1 parent d818901 commit 4c6a83f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/release.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ jobs:
5656
git config --global user.name "${{ github.actor }}"
5757
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
5858
59-
# Step 8: Lerna Version
59+
# Step 8: Reset working directory
60+
- name: Reset working directory
61+
run: git checkout -- .
62+
63+
# Step 9: Lerna Version
6064
- name: Lerna Version
6165
env:
6266
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6367
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6468
run: yarn version:ci
6569

66-
# Step 9: Commit changes
70+
# Step 10: Commit changes
6771
- name: Commit changes
6872
env:
6973
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -72,13 +76,13 @@ jobs:
7276
commit_message: "chore(release): Publish"
7377
branch: ${{ github.head_ref }}
7478

75-
# Step 10: Publish NPM packages
79+
# Step 11: Publish NPM packages
7680
- name: Lerna Publish
7781
env:
7882
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
7983
run: yarn publish:ci
8084

81-
# Step 11: Post breaking changes to a Slack channel
85+
# Step 12: Post breaking changes to a Slack channel
8286
- name: Post breaking changes to a Slack channel
8387
env:
8488
SLACK_WEBHOOK_URL: ${{ secrets.SDS_BREAKING_CHANGES_SLACK_WEBHOOK }}
@@ -89,7 +93,7 @@ jobs:
8993
config: .github/config/slack.yml
9094
if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE')
9195

92-
# Step 12: Merge prod branch into main
96+
# Step 13: Merge prod branch into main
9397
- name: Create PR to merge prod into main
9498
id: createpr
9599
env:

0 commit comments

Comments
 (0)