Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafciq authored Feb 8, 2025
1 parent 910e0be commit 5f1acbc
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Release"

on:
release:
types:
- "published"

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
permissions:
contents: write
id-token: write
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.2.1"

- name: 🔢 Adjust version number
shell: bash
run: |
version="${{ github.event.release.tag_name }}"
version="${version,,}"
version="${version#v}"
yq e -P -o=json \
-i ".version = \"${version}\"" \
"${{ github.workspace }}/custom_components/bm6/manifest.json"
- name: "ZIP the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/bm6"
zip adaptive_cover.zip -r ./
- name: "Upload the ZIP file to the release"
uses: softprops/action-gh-release@v2.0.8
with:
files: ${{ github.workspace }}/custom_components/bm6/bm6.zip

0 comments on commit 5f1acbc

Please sign in to comment.