diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0ece0f6328f..48bf8442a5f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -43,11 +43,19 @@ jobs: - name: Build packages run: pnpm run build - - name: Tag and Publish Packages - id: tag_publish + - name: Publish Packages + id: publish run: | - npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish - npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }} + # 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 + + npx lerna publish from-git --yes --dist-tag latest + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Get Version Tag id: get_tag