Bump add-on version & release #137
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
| # 2025 (C) Alfa Development Group | |
| # Developed by SistemaRayoXP | |
| name: Bump add-on version & release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version_type: | |
| description: 'Tipo de versión a publicar' | |
| required: true | |
| type: choice | |
| options: | |
| - feature | |
| - major | |
| - minor | |
| permissions: write-all | |
| env: | |
| GIT_USER_NAME: Alfa Development Group | |
| GIT_USER_EMAIL: [email protected] | |
| GITHUB_REPOSITORY: alfa-addon/addon | |
| KODI_REPOSITORY: alfa-addon/alfa-repo | |
| ADDON: plugin.video.alfa | |
| jobs: | |
| deploy: | |
| name: Deploy add-on | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - uses: actions/setup-python@v5 | |
| - name: Install environment tools | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xmlstarlet jq | |
| pip install -r requirements-ci.txt | |
| - name: Bump version and release on GitHub | |
| id: release | |
| working-directory: ${{ github.workspace }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| case "${{ github.event.inputs.version_type }}" in | |
| feature) VERSION=$(scripts/release.sh -qRcgv) ;; | |
| major) VERSION=$(scripts/release.sh -qBcgv) ;; | |
| minor) VERSION=$(scripts/release.sh -qbcgv) ;; | |
| esac | |
| ZIP_FILE=$(scripts/release.sh -qz) | |
| gh release create "Alfa-v$VERSION" "$ZIP_FILE" | |
| url=$(gh api repos/$GITHUB_REPOSITORY/releases/latest --jq '.assets[0].browser_download_url') | |
| echo "url=$url" >> $GITHUB_OUTPUT | |
| - uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ secrets.REPO_TOKEN }} | |
| repository: ${{ env.KODI_REPOSITORY }} | |
| event-type: update-repo | |
| client-payload: >- | |
| { | |
| "addon_id": "${{ env.ADDON }}", | |
| "url": "${{ steps.release.outputs.url }}" | |
| } |