Skip zero-length metadata blocks during header parsing (#29) #42
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 Drafter | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Release automation routes every repo operation (release-drafter, checkout, and the version-bump | |
| # push) through the GitHub App token generated below, so the default GITHUB_TOKEN is unused here. | |
| # Grant it no permissions at all. GitHub always mints the token; the empty set just strips its powers. | |
| permissions: {} | |
| jobs: | |
| release-drafter: | |
| name: Release Drafter | |
| environment: release-drafter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate a token | |
| id: generate-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| app-id: ${{ secrets.ESPHOME_GITHUB_APP_ID }} | |
| private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }} | |
| - uses: release-drafter/release-drafter@4d75298e00d9e34c483e5ff8c68d0ea1c1940c1e # v7.5.1 | |
| id: drafter | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| - name: Update version files | |
| run: | | |
| sed -i "s/\"version\": .*/\"version\": \"${{ steps.drafter.outputs.resolved_version }}\",/g" library.json | |
| sed -i "s/version: .*/version: \"${{ steps.drafter.outputs.resolved_version }}\"/g" idf_component.yml | |
| sed -i "s/project(micro_flac VERSION .* LANGUAGES/project(micro_flac VERSION ${{ steps.drafter.outputs.resolved_version }} LANGUAGES/g" CMakeLists.txt | |
| - name: Commit changes | |
| run: | | |
| if ! git diff --quiet; then | |
| git config --global user.name "esphomebot" | |
| git config --global user.email "68923041+esphomebot@users.noreply.github.com" | |
| git commit -am "Bump version to ${{ steps.drafter.outputs.resolved_version }}" | |
| git push | |
| fi |