mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
93 lines
1.9 KiB
YAML
93 lines
1.9 KiB
YAML
trigger:
|
|
batch: true
|
|
branches:
|
|
include:
|
|
- master
|
|
- release-*
|
|
tags:
|
|
include:
|
|
- '*'
|
|
pr:
|
|
branches:
|
|
include:
|
|
- '*'
|
|
|
|
jobs:
|
|
- job: build
|
|
displayName: 'Build'
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
strategy:
|
|
matrix:
|
|
Development:
|
|
BuildConfiguration: development
|
|
Bundle:
|
|
BuildConfiguration: bundle
|
|
Standalone:
|
|
BuildConfiguration: standalone
|
|
maxParallel: 3
|
|
|
|
steps:
|
|
- task: NodeTool@0
|
|
displayName: 'Install Node'
|
|
inputs:
|
|
versionSpec: '10.x'
|
|
|
|
- task: Cache@2
|
|
displayName: 'Check Cache'
|
|
inputs:
|
|
key: 'yarn | yarn.lock'
|
|
path: 'node_modules'
|
|
|
|
- script: 'yarn install'
|
|
displayName: 'Install Dependencies'
|
|
|
|
- script: 'yarn build'
|
|
displayName: 'Build Development'
|
|
condition: eq(variables['BuildConfiguration'], 'development')
|
|
|
|
- script: 'yarn build'
|
|
displayName: 'Build Bundle'
|
|
condition: eq(variables['BuildConfiguration'], 'bundle')
|
|
|
|
- script: 'yarn build --standalone'
|
|
displayName: 'Build Standalone'
|
|
condition: eq(variables['BuildConfiguration'], 'standalone')
|
|
|
|
- script: 'test -d dist'
|
|
displayName: 'Check Build'
|
|
|
|
- script: 'mv dist jellyfin-web'
|
|
displayName: 'Rename Directory'
|
|
condition: succeeded()
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish Release'
|
|
condition: succeeded()
|
|
inputs:
|
|
targetPath: '$(Build.SourcesDirectory)/jellyfin-web'
|
|
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|
|
|
|
- job: lint
|
|
displayName: 'Lint'
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
- task: NodeTool@0
|
|
displayName: 'Install Node'
|
|
inputs:
|
|
versionSpec: '10.x'
|
|
|
|
- script: 'yarn install'
|
|
displayName: 'Install Dependencies'
|
|
|
|
- script: 'yarn run lint'
|
|
displayName: 'Run ESLint'
|
|
|
|
- script: 'yarn run stylelint'
|
|
displayName: 'Run Stylelint'
|