67.1 #17
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: Add release badges | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| badges: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const marker = "<!-- install-badges -->" | |
| const release = context.payload.release | |
| const body = release.body || "" | |
| if (body.includes(marker)) return | |
| const badges = `${marker} | |
| ## Get Bottles | |
| [](https://flathub.org/apps/com.usebottles.bottles) | |
| [](https://cpak.it/store/Utilities/github.com/bottlesdevs/bottles)` | |
| await github.rest.repos.updateRelease({ | |
| ...context.repo, | |
| release_id: release.id, | |
| body: `${body.trim()}\n\n${badges}`, | |
| }) |