Adjust to TGE page changes #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| env: | |
| COMPONENT_NAME: tge | |
| jobs: | |
| release: | |
| name: Prepare release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Download repo | |
| uses: actions/checkout@v4.2.2 | |
| - name: Adjust version number | |
| shell: bash | |
| run: | | |
| version="${{ github.event.release.tag_name }}" | |
| yq e -P -o=json \ | |
| -i ".version = \"${version}\"" \ | |
| "${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/manifest.json" | |
| - name: Zip ${{ env.COMPONENT_NAME }} dir | |
| run: | | |
| cd "${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}" | |
| zip ${{ env.COMPONENT_NAME }}.zip -r ./ | |
| - name: Upload zip to release | |
| uses: softprops/action-gh-release@v2.1.0 | |
| with: | |
| files: ${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/${{ env.COMPONENT_NAME }}.zip |