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