Merge branch 'hotfix/v2.5.1' into develop

This commit is contained in:
Alexey Safronov 2024-05-21 19:09:02 +04:00
commit 7f46d74010

30
.github/workflows/update-version.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Update packages versions
on:
create:
jobs:
change-version:
if: (startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/heads/hotfix/'))
name: "Update packages versions"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: '${{ github.token }}'
- name: Filter changes and update versions
run: |
VERSION=$(echo "${GITHUB_REF#refs/heads/}" | sed 's/[^0-9.]*//g')
echo "VERSION=$VERSION" >> $GITHUB_ENV
sed -i "s/\(\"version\":\).*/\1 \"$VERSION\",/g" packages/*/package.json
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: Update version in packages.json to v${{ env.VERSION }}