Fix release workflow (#600) #21
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: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| name: Release script.module.inputstreamhelper | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Build zip files | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libxml2-utils | |
| make zip release=1 | |
| - name: Get Matrix filename | |
| id: get-matrix-filename | |
| run: | | |
| echo matrix-filename=$(cd ..;ls script.module.inputstreamhelper*.zip | head -1) >> $GITHUB_OUTPUT | |
| - name: Get body | |
| id: get-body | |
| run: | | |
| description=$(sed '1,/^## Releases$/d;/## v[0-9\.]* ([0-9-]*)/d;/^$/,$d' README.md) | |
| echo $description | |
| EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
| echo "body<<$EOF" >> $GITHUB_OUTPUT | |
| echo "$description" >> $GITHUB_OUTPUT | |
| echo "$EOF" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: ${{ github.ref }} | |
| body: ${{ steps.get-body.outputs.body }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ../${{ steps.get-matrix-filename.outputs.matrix-filename }} | |
| - name: Generate distribution zip and submit to official kodi repository | |
| id: kodi-addon-submitter | |
| uses: mediaminister/action-kodi-addon-submitter@master | |
| with: | |
| kodi-repository: repo-scripts | |
| kodi-version: matrix | |
| addon-id: script.module.inputstreamhelper | |
| kodi-matrix: false | |
| env: | |
| GH_USERNAME: ${{secrets.GH_USERNAME}} | |
| GH_TOKEN: ${{secrets.GH_TOKEN}} | |
| EMAIL: ${{secrets.EMAIL}} | |