From d496ae1d783ff155a2f695b0d9ccd4e661ac9488 Mon Sep 17 00:00:00 2001 From: vendelieu Date: Sun, 8 Sep 2024 00:55:12 +0300 Subject: [PATCH] update release ci with ksp replacing steps --- .github/workflows/ci.release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.release.yml b/.github/workflows/ci.release.yml index 3ea2c1fa4e..cec02a51eb 100644 --- a/.github/workflows/ci.release.yml +++ b/.github/workflows/ci.release.yml @@ -80,11 +80,24 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + - uses: jacobtomlinson/gha-find-replace@v3 + name: Replace lib version with: find: '([:"])([0-9]+\.[0-9]+\.[0-9]+)\"' replace: "${1}${{ needs.version.outputs.version }}\"" include: "**README.md" + + - name: Extract KSP version + id: extract_version + run: | + VERSION=$(grep 'ksp = "' gradle/libs.versions.toml | sed -E 's/.*ksp = "([^"]+)".*/\1/') + echo "KSP_VERSION=$VERSION" >> "$GITHUB_ENV" + + - name: Replace ksp plugin version + run: | + sed -i -E 's/id\("com\.google\.devtools\.ksp"\)\s*version\s*"[^"]+"/id("com.google.devtools.ksp") version "$KSP_VERSION"/g' README.md + - name: Push changes uses: stefanzweifel/git-auto-commit-action@v5 with: