-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96269c6
commit 84c83c8
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,46 +14,47 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
- name: Parse version | ||
- name: Strip prefix from tag and return version | ||
id: version | ||
# weird hassio-addons/repository-updater behaviour | ||
# Always creates add-on Readme URL with `v` prefix. E.g. /tree/v*.*.*. so we need tags prefixed with `v` for working add-ons Readme | ||
# `v` prefix is always stripped when creating addon config.json in add-ons repo ... so we need to build containers without prefix | ||
# Final verdict: tag prefixed with `v`, everything else without prefix => package.json, config.json (version is used for docker build) | ||
run: | | ||
TAG=${{ github.event.release.tag_name }} | ||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV | ||
echo "version=${TAG#v}" >> $GITHUB_ENV | ||
- name: Update root package.json version | ||
uses: jossef/[email protected] | ||
with: | ||
file: package.json | ||
field: version | ||
value: ${{ VERSION }} | ||
value: ${{ steps.version.outputs.version }} | ||
- name: Update laskakit-data-feeder package.json version | ||
uses: jossef/[email protected] | ||
with: | ||
file: laskakit-data-feeder/package.json | ||
field: version | ||
value: ${{ VERSION }} | ||
value: ${{ steps.version.outputs.version }} | ||
- name: Update laskakit-data-feeder addon config.json version | ||
uses: jossef/[email protected] | ||
with: | ||
file: laskakit-data-feeder/config.json | ||
field: version | ||
value: ${{ VERSION }} | ||
value: ${{ steps.version.outputs.version }} | ||
- name: Extract release date from git tag | ||
id: release_date | ||
run: | | ||
echo "date=$(git log -1 --date=short --format=%ad '${{ github.event.release.tag_name }}')" >> $GITHUB_OUTPUT; | ||
- name: Update Changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ VERSION }} | ||
latest-version: ${{ steps.version.outputs.version }} | ||
release-date: ${{ steps.release_date.outputs.date }} | ||
release-notes: ${{ github.event.release.body }} | ||
- name: Commit and push | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "chore: Release ${{ VERSION }} [skip ci]" | ||
commit_message: "chore: Release ${{ steps.version.outputs.version }} [skip ci]" | ||
|
||
publish-docker: | ||
name: Publish to Docker Hub | ||
|