mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
parameters:
|
|
python_versions : []
|
|
|
|
steps:
|
|
- ${{ each py_version in parameters.py_versions }}:
|
|
- task: usePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.6'
|
|
|
|
- checkout: self
|
|
clean: true
|
|
|
|
- script: python3 -m pip install --user pyyaml
|
|
displayName: 'Install PyYaml'
|
|
|
|
- script: python3 jellyfin-kodi/.config/generate_xml.py ${{ py_version }}
|
|
displayName: 'Create ${{ py_version }} addon.xml'
|
|
|
|
- task: ArchiveFiles@2
|
|
displayName: 'Create ${{ py_version }} zip file'
|
|
inputs:
|
|
rootFolderOrFile: jellyfin-kodi
|
|
includeRootFolder: False
|
|
archiveType: 'zip'
|
|
tarCompression: 'none'
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/plugin.video.jellyfin-${{ py_version }}.zip'
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish ${{ py_version }} artifact'
|
|
inputs:
|
|
targetPath: '$(Build.ArtifactStagingDirectory)/plugin.video.jellyfin-${{ py_version }}.zip'
|
|
artifactName: 'plugin.video.jellyfin-${{ py_version }}-$(Build.BuildNumber).zip'
|
|
|
|
- task: CopyFilesOverSSH@0
|
|
displayName: 'Upload to repo server'
|
|
inputs:
|
|
sshEndpoint: repository
|
|
sourceFolder: '$(Build.ArtifactStagingDirectory)'
|
|
contents: 'plugin.video.jellyfin-${{ py_version }}.zip'
|
|
targetFolder: '/srv/repository/incoming/kodi'
|
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
|
|
- task: SSH@0
|
|
displayName: 'Add to Kodi repo'
|
|
inputs:
|
|
sshEndpoint: repository
|
|
runOptions: 'commands'
|
|
commands: 'sudo -n python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin-${{ py_version }} --datadir /srv/repository/releases/client/kodi/${{ py_version }}'
|
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|