Skip to content

Commit

Permalink
Merge pull request #767 from canton7/feature/zip-release
Browse files Browse the repository at this point in the history
Create release zips
  • Loading branch information
canton7 authored Feb 3, 2025
2 parents 91cdc65 + 9fb532a commit 48b0011
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/release-drafter.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create a release
on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
build:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Create release
id: create_release
uses: release-drafter/[email protected]
with:
name: ${{ github.ref_name }}
tag: ${{ github.ref_name }}
version: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Patch manifest and zip
run: |
TAG=${{ github.ref_NAME }}
cd custom_components/foxess_modbus/
jq ".version=\"${TAG#v}\"" manifest.json > manifest.json.tmp
mv manifest.json.tmp manifest.json
zip ../../foxess_modbus.zip -r ./
- name: Upload release asset
run: gh release upload "${{ github.ref_name }}" foxess_modbus.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion custom_components/foxess_modbus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"integration_type": "service",
"iot_class": "local_push",
"issue_tracker": "https://github.com/nathanmarlor/foxess_modbus/issues",
"version": "1.0.0"
"version": "0.0.0"
}
4 changes: 3 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"name": "FoxESS - Modbus",
"hacs": "1.20.0",
"homeassistant": "2025.1.0",
"render_readme": true
"render_readme": true,
"zip_release": true,
"filename": "foxess_modbus.zip"
}

0 comments on commit 48b0011

Please sign in to comment.