Skip to content

Commit

Permalink
feat: release procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
Daanoz committed Jan 24, 2023
1 parent 729ab40 commit 7e57c35
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Get version
id: version
uses: home-assistant/actions/helpers/version@master

- name: Patch manifest and zip
run: |
sed -i 's/v0.0.0/${{ steps.version.outputs.version }}/' custom_components/google_photos/manifest.json
cd custom_components/google_photos/
zip ../../google_photos.zip ./* translations/* -x '.*'
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: google_photos.zip
tag: ${{ github.ref }}
overwrite: true
2 changes: 1 addition & 1 deletion custom_components/google_photos/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"issue_tracker": "https://github.com/daanoz/ha-google-photos/issues",
"dependencies": ["application_credentials"],
"requirements": ["google-api-python-client==2.71.0"],
"version": "0.0.0",
"version": "v0.0.0",
"codeowners": [
"@daanoz"
],
Expand Down
5 changes: 4 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"name": "Google Photos",
"hacs": "1.6.0",
"homeassistant": "2022.6.0",
"render_readme": true
"render_readme": true,
"zip_release": true,
"filename": "google_photos.zip",
"hide_default_branch": true
}

0 comments on commit 7e57c35

Please sign in to comment.