Skip to content

Commit

Permalink
Merge pull request #6 from cdnninja/release
Browse files Browse the repository at this point in the history
chore: Create release.yml
  • Loading branch information
cdnninja authored Apr 20, 2024
2 parents 22a7586 + fc07bdc commit 39a6a27
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * Wed,Sun"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Gets semantic release info
id: semantic_release_info
uses: jossef/action-semantic-release-info@v2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Update Version and Commit
if: ${{steps.semantic_release_info.outputs.version != ''}}
run: |
echo "Version: ${{steps.semantic_release_info.outputs.version}}"
sed -i "s/\"version\": \".*\"/\"version\": \"${{steps.semantic_release_info.outputs.version}}\"/g" custom_components/yoto/manifest.json
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "chore: bumping version to ${{steps.semantic_release_info.outputs.version}}"
git tag ${{ steps.semantic_release_info.outputs.git_tag }}
- name: Push changes
if: ${{steps.semantic_release_info.outputs.version != ''}}
uses: ad-m/[email protected]
with:
github_token: ${{ github.token }}
tags: true

- name: Create GitHub Release
if: ${{steps.semantic_release_info.outputs.version != ''}}
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ steps.semantic_release_info.outputs.git_tag }}
name: ${{ steps.semantic_release_info.outputs.git_tag }}
body: ${{ steps.semantic_release_info.outputs.notes }}
draft: false
prerelease: false
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ Home Assistant Integration for Yoto. While this currently loads and installs sen

PRs are appreciated to add more.


![image](https://github.com/cdnninja/yoto_ha/assets/6373468/37407b4e-e172-4c7d-8882-a2189e6d4d97)

0 comments on commit 39a6a27

Please sign in to comment.