mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 13:23:41 +00:00
chore(release): sync manifest.json with tag and recreate release if necessary
This commit is contained in:
parent
b78ddeaf43
commit
7978498006
1 changed files with 15 additions and 1 deletions
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
|
|
@ -77,15 +77,29 @@ jobs:
|
||||||
- name: Commit and push manifest.json update
|
- name: Commit and push manifest.json update
|
||||||
if: steps.update.outputs.updated == 'true'
|
if: steps.update.outputs.updated == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
TAG_VERSION="v${{ steps.tag.outputs.version }}"
|
||||||
|
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
git add custom_components/tibber_prices/manifest.json
|
git add custom_components/tibber_prices/manifest.json
|
||||||
git commit -m "chore(release): sync manifest.json with tag v${{ steps.tag.outputs.version }}"
|
git commit -m "chore(release): sync manifest.json with tag ${TAG_VERSION}"
|
||||||
|
|
||||||
# Push to main branch
|
# Push to main branch
|
||||||
git push origin HEAD:main
|
git push origin HEAD:main
|
||||||
|
|
||||||
|
# Delete and recreate tag on new commit
|
||||||
|
echo "::notice::Recreating tag ${TAG_VERSION} on updated commit"
|
||||||
|
git tag -d "${TAG_VERSION}"
|
||||||
|
git push origin :refs/tags/"${TAG_VERSION}"
|
||||||
|
git tag -a "${TAG_VERSION}" -m "Release ${TAG_VERSION}"
|
||||||
|
git push origin "${TAG_VERSION}"
|
||||||
|
|
||||||
|
# Delete existing release if present (will be recreated by release-notes job)
|
||||||
|
gh release delete "${TAG_VERSION}" --yes --cleanup-tag=false || echo "No existing release to delete"
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-notes:
|
release-notes:
|
||||||
name: Generate and publish release notes
|
name: Generate and publish release notes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue