4 Commits
2 changed files with 47 additions and 1 deletions
+46
View File
@@ -0,0 +1,46 @@
name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.1.5)'
required: true
type: string
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update manifest.json
run: |
sed -i 's/"version": ".*"/"version": "${{ github.event.inputs.version }}"/' custom_components/rdz_hmi_control/manifest.json
- name: Commit manifest change
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add custom_components/rdz_hmi_control/manifest.json
git commit -m "Bump version to ${{ github.event.inputs.version }}"
git push
- name: Create tag
run: |
git tag v${{ github.event.inputs.version }}
git push origin v${{ github.event.inputs.version }}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: v${{ github.event.inputs.version }}
draft: true
prerelease: false
@@ -8,5 +8,5 @@
"integration_type": "device", "integration_type": "device",
"iot_class": "local_polling", "iot_class": "local_polling",
"requirements": ["pymodbus>=3.6.0"], "requirements": ["pymodbus>=3.6.0"],
"version": "1.1.1" "version": "1.1.2"
} }