Skip to content

Commit

Permalink
add zip release and version numbering to manifest (#29)
Browse files Browse the repository at this point in the history
* add zip release and version numbering to manifest
* add pinkywafer as codeowner
  • Loading branch information
pinkywafer authored Feb 8, 2021
1 parent adc6555 commit 590d721
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: "Set version number"
run: |
sed -i 's|"version": "0.0.0"|"version": "${{ github.ref }}"|' custom_components/youtube/manifest.json
sed -i 's|refs/heads/||' custom_components/youtube/manifest.json
sed -i 's|refs/tags/||' custom_components/youtube/manifest.json
- name: ZIP youtube folder
run: |
cd ${{ github.workspace }}/custom_components/youtube
zip youtube.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release

with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/custom_components/youtube/youtube.zip
asset_name: youtube.zip
tag: ${{ github.ref }}
overwrite: true
3 changes: 2 additions & 1 deletion custom_components/youtube/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"domain": "youtube",
"name": "Youtube Sensor",
"version": "0.0.0",
"documentation": "https://github.com/custom-components/youtube",
"dependencies": [],
"codeowners": ["@ludeeus"],
"codeowners": ["@ludeeus", "@pinkywafer"],
"requirements": []
}
6 changes: 6 additions & 0 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "youtube",
"zip_release": true,
"filename": "youtube.zip",
"iot_class": "Cloud Poll"
}

0 comments on commit 590d721

Please sign in to comment.