Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Create release zip from git-tracked integration files
run: git archive --format=zip -o pvoutput_publisher.zip HEAD:custom_components/pvoutput_publisher

- name: Upload zip asset to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: pvoutput_publisher.zip
9 changes: 5 additions & 4 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ To create a new release for users (via HACS and GitHub):

### Step 4: Publish GitHub Release (HACS Changelog)
HACS pulls release changelogs directly from **GitHub Releases**:
1. On GitHub, navigate to **Releases > Draft a new release** (or use `gh release create X.Y.Z`).
2. Tag version: `X.Y.Z` (e.g. `2.0.0`).
3. Title: `Release X.Y.Z`.
1. On GitHub, navigate to **Releases > Draft a new release** (or use `gh release create vX.Y.Z`).
2. Tag version: `vX.Y.Z` (e.g. `v2.1.0`).
3. Title: `Release vX.Y.Z` (or `vX.Y.Z`).
4. **Description:** Copy and paste the exact markdown section from `CHANGELOG.md` for this version into the GitHub release description.
5. Click **Publish Release**.
6. HACS will automatically detect the new release and display the release notes inside Home Assistant for updating users.
6. Publishing the release automatically triggers [`.github/workflows/release.yaml`](file:///Users/spowis/Documents/code/HomeAssistant-PVOutputPublisher/.github/workflows/release.yaml), which builds `pvoutput_publisher.zip` from `custom_components/pvoutput_publisher` and attaches it to the release so HACS can track download counts.
7. HACS will automatically detect the new release and display the release notes inside Home Assistant for updating users.
4 changes: 3 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "PVOutput Publisher",
"render_readme": true
"render_readme": true,
"zip_release": true,
"filename": "pvoutput_publisher.zip"
}
Loading