From 7e290fa327aa9f592b0ecf1b8852de92ef44e089 Mon Sep 17 00:00:00 2001 From: cygaar Date: Mon, 2 Dec 2024 21:31:56 -0500 Subject: [PATCH 1/2] fix: release workflow part 3 --- .github/workflows/release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 48d5f7374e..9f2d054e64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,12 +45,12 @@ jobs: 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 git clean -fd - git reset --hard $LATEST_TAG + git reset --hard HEAD + + # Force checkout the latest tag + git checkout -f $LATEST_TAG npx lerna publish from-git --yes --dist-tag latest env: From 65b03ce088e4d5dc5f9e7690ccc3e2b7ea85d577 Mon Sep 17 00:00:00 2001 From: cygaar Date: Mon, 2 Dec 2024 21:33:02 -0500 Subject: [PATCH 2/2] Add echos --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9f2d054e64..86bbc16f32 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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" # Force clean the working directory and reset any changes + echo "Cleaning working directory and resetting any changes" git clean -fd 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 }}