Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release workflow part 3 #807

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ jobs:
run: |
# Get the latest release tag
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Publishing version: $LATEST_TAG"

# Checkout the latest tag
git checkout $LATEST_TAG

# Clean any untracked files that differ from the latest tag and reset any changes
# Force clean the working directory and reset any changes
echo "Cleaning working directory and resetting any changes"
git clean -fd
git reset --hard $LATEST_TAG
git reset --hard HEAD

# Force checkout the latest tag
echo "Checking out latest tag: $LATEST_TAG"
git checkout -f $LATEST_TAG

echo "Publishing version: $LATEST_TAG"
npx lerna publish from-git --yes --dist-tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
Loading