Skip to content

Commit

Permalink
update release ci with ksp replacing steps
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Sep 7, 2024
1 parent 85e26fd commit d496ae1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d496ae1

Please sign in to comment.