From 0bb042c0130e98e582ab5ace360c43efd12a0e23 Mon Sep 17 00:00:00 2001 From: David Rapan Date: Mon, 12 Aug 2024 00:46:19 +0200 Subject: [PATCH] feat: Bump version workflow now also creates tags --- .github/workflows/bump.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml index 27cd4d2..3a53039 100644 --- a/.github/workflows/bump.yaml +++ b/.github/workflows/bump.yaml @@ -34,9 +34,11 @@ jobs: sparse-checkout: | custom_components/solarman/manifest.json sparse-checkout-cone-mode: false - - run: 'sed -i "s/.*version.*/ \"version\": \"$(date +''%y.%m.%d'')\"/" custom_components/solarman/manifest.json' - run: | + version=$(date +"%y.%m.%d") + sed -i "s/.*version.*/ \"version\": \"$version\"/" custom_components/solarman/manifest.json git config --global user.name "Continuous Integration" git config --global user.email "david@rapan.cz" git commit -m "chore: bump version" custom_components/solarman/manifest.json - git push + git tag -a "v$version" -m "Scheduled $([[ $version == *4 ]] || echo 'pre-')release" + git push --tags