From 01f1afd1a728e112e5e8c94dc6f48b398c936468 Mon Sep 17 00:00:00 2001 From: cygaar Date: Mon, 2 Dec 2024 20:56:16 -0500 Subject: [PATCH 1/2] fix: release workflow --- .github/workflows/release.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 48bf8442a5f..2ef12ca95ca 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,11 +2,6 @@ name: Release on: workflow_dispatch: - inputs: - release_type: - description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)" - required: true - default: "patch" jobs: release: @@ -50,6 +45,10 @@ jobs: LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) echo "Publishing version: $LATEST_TAG" + # Clean any untracked files and reset any changes + git clean -fd + git reset --hard HEAD + # Checkout the latest tag git checkout $LATEST_TAG From 0569dfc2e890ec062ad7b4590ff247ad6b41ae9f Mon Sep 17 00:00:00 2001 From: cygaar Date: Mon, 2 Dec 2024 21:07:19 -0500 Subject: [PATCH 2/2] Update ordering --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2ef12ca95ca..48d5f7374e2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,13 +45,13 @@ jobs: LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) echo "Publishing version: $LATEST_TAG" - # Clean any untracked files and reset any changes - git clean -fd - git reset --hard HEAD - # Checkout the latest tag git checkout $LATEST_TAG + # Clean any untracked files that differ from the latest tag and reset any changes + git clean -fd + git reset --hard $LATEST_TAG + npx lerna publish from-git --yes --dist-tag latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}