-
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.
Merge pull request #4 from radoslavirha/release
ci: test release drafter
- Loading branch information
Showing
2 changed files
with
93 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
update-versions-changelog: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
- name: Strip prefix from tag and return version | ||
id: version | ||
run: | | ||
TAG=${{ github.event.release.tag_name }} | ||
echo "version=${TAG}" >> "$GITHUB_OUTPUT" | ||
- name: Echo version | ||
run: | | ||
echo ${{ steps.version.outputs.version }} | ||
# - name: Update root package.json version | ||
# uses: jossef/[email protected] | ||
# with: | ||
# file: package.json | ||
# field: 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: ${{ 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: ${{ 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: ${{ 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 ${{ steps.version.outputs.version }} [skip ci]" | ||
|
||
# publish-docker: | ||
# name: Publish to Docker Hub | ||
# runs-on: ubuntu-latest | ||
# needs: | ||
# - update-versions-changelog | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# ref: main | ||
# - name: Login to DockerHub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# - name: Publish to Docker Hub | ||
# uses: home-assistant/builder@master | ||
# with: | ||
# args: | | ||
# --all \ | ||
# --target laskakit-data-feeder \ | ||
# --docker-hub ${{ secrets.DOCKERHUB_USERNAME }} | ||
|
||
# update-add-ons-repository: | ||
# name: 📢 Publish Add-on in Homeassistant | ||
# runs-on: ubuntu-latest | ||
# needs: | ||
# - publish-docker | ||
# steps: | ||
# - name: 🚀 Dispatch Repository Updater update signal | ||
# uses: peter-evans/repository-dispatch@v1 | ||
# with: | ||
# token: ${{ secrets.HA_DISPATCH_TOKEN }} | ||
# repository: radoslavirha/homeassistant-addons | ||
# event-type: update | ||
# client-payload: '{"addon": "laskakit-data-feeder"}' |