From 9079a9868c5f784a450662c1ab1bcaf08e615e3f Mon Sep 17 00:00:00 2001 From: Constantin Pascal Date: Thu, 29 Jan 2026 10:43:17 +0200 Subject: [PATCH] adding github actions for release --- .github/workflows/release.yaml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..182ca73 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,43 @@ +name: Create Release + +on: + workflow_dispatch: + inputs: + version: + description: 'Release version (e.g., 1.1.5)' + required: true + type: string + +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 \ No newline at end of file