Skip to content

Commit

Permalink
refactor(gh actions): add a step to reset working directory before le…
Browse files Browse the repository at this point in the history
…rna version
  • Loading branch information
masoudmanson committed Dec 18, 2024
1 parent d818901 commit 4c6a83f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ jobs:
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
# Step 8: Lerna Version
# Step 8: Reset working directory
- name: Reset working directory
run: git checkout -- .

# Step 9: Lerna Version
- name: Lerna Version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn version:ci

# Step 9: Commit changes
# Step 10: Commit changes
- name: Commit changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,13 +76,13 @@ jobs:
commit_message: "chore(release): Publish"
branch: ${{ github.head_ref }}

# Step 10: Publish NPM packages
# Step 11: Publish NPM packages
- name: Lerna Publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: yarn publish:ci

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

# Step 12: Merge prod branch into main
# Step 13: Merge prod branch into main
- name: Create PR to merge prod into main
id: createpr
env:
Expand Down

0 comments on commit 4c6a83f

Please sign in to comment.