Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate core version with 'git describe' and update automatically in changelog as well #1510

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
id: get-core-version
run: |
cd src/realm-core
pkgVersion=$(grep "\bVERSION=" dependencies.list | cut -d= -f2)
pkgVersion=$(git describe --abbrev=5)
echo "core-version=$pkgVersion" >> $GITHUB_OUTPUT
echo "Realm Core version: $pkgVersion"
shell: bash
Expand All @@ -95,6 +95,15 @@ jobs:
exit 1
fi

- name: Update realmCoreVersion in changelog
id: update-realmCoreVersion-changelog
uses: jacobtomlinson/gha-find-replace@b76729678e8d52dadb12e0e16454a93e301a919d #! 2.0.0
with:
find: "* Using Core x.y.z."
regex: false
replace: "* Using Core ${{ steps.get-core-version.outputs.core-version }}."
include: 'CHANGELOG.md'

- name: Create Release PR
uses: peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad #! 3.10.1
with:
Expand Down
Loading