2021-06-01 19:26:59 +00:00
|
|
|
name: Publish Jellyfin-Kodi
|
2021-05-14 15:18:54 +00:00
|
|
|
|
|
|
|
on:
|
2021-06-01 19:26:59 +00:00
|
|
|
workflow_dispatch:
|
2021-05-14 15:18:54 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-06-01 19:26:59 +00:00
|
|
|
publish:
|
2021-05-14 15:18:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
py_version: [ 'py2', 'py3' ]
|
|
|
|
steps:
|
2021-06-01 19:26:59 +00:00
|
|
|
- name: Update Draft
|
2023-06-30 17:09:08 +00:00
|
|
|
uses: release-drafter/release-drafter@v5.24.0
|
2021-06-06 00:08:13 +00:00
|
|
|
if: ${{ matrix.py_version == 'py3' }}
|
2021-06-01 19:26:59 +00:00
|
|
|
with:
|
|
|
|
publish: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
|
|
|
|
2021-05-14 15:18:54 +00:00
|
|
|
- name: Checkout repository
|
2022-03-09 21:07:21 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-05-14 15:18:54 +00:00
|
|
|
|
|
|
|
- name: Set up Python 3.x
|
2022-06-13 14:09:58 +00:00
|
|
|
uses: actions/setup-python@v4
|
2021-05-14 15:18:54 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install pyyaml
|
|
|
|
|
|
|
|
- name: Create ${{ matrix.py_version }} addon.xml
|
2021-06-01 19:39:51 +00:00
|
|
|
run: python build.py --version ${{ matrix.py_version }}
|
2021-05-14 15:18:54 +00:00
|
|
|
|
2021-05-23 18:17:06 +00:00
|
|
|
- name: Publish Build Artifact
|
2022-04-11 14:22:11 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-14 15:18:54 +00:00
|
|
|
with:
|
|
|
|
retention-days: 14
|
|
|
|
name: ${{ matrix.py_version }}-build-artifact
|
|
|
|
path: |
|
2021-05-23 18:17:06 +00:00
|
|
|
*.zip
|
2021-05-14 15:18:54 +00:00
|
|
|
|
|
|
|
- name: Upload to repo server
|
2022-01-03 14:07:08 +00:00
|
|
|
uses: burnett01/rsync-deployments@5.2
|
2021-05-14 15:18:54 +00:00
|
|
|
with:
|
2021-05-27 21:33:54 +00:00
|
|
|
switches: -vrptz
|
|
|
|
path: '*.zip'
|
2021-05-14 15:18:54 +00:00
|
|
|
remote_path: /srv/repository/incoming/kodi
|
|
|
|
remote_host: ${{ secrets.DEPLOY_HOST }}
|
|
|
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
|
|
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
|
|
|
|
- name: Add to Kodi repo and clean up
|
2023-07-31 22:55:10 +00:00
|
|
|
uses: appleboy/ssh-action@v1.0.0
|
2021-05-14 15:18:54 +00:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
|
|
key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
script_stop: true
|
|
|
|
script: |
|
2021-05-27 21:33:54 +00:00
|
|
|
python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }};
|
|
|
|
rm /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip;
|