2020-06-12 08:18:20 -07:00
|
|
|
jobs:
|
|
|
|
- job: Build
|
|
|
|
displayName: 'Build'
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Development:
|
|
|
|
BuildConfiguration: development
|
|
|
|
Production:
|
|
|
|
BuildConfiguration: production
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: 'Install Node'
|
|
|
|
inputs:
|
2022-09-29 22:53:04 -07:00
|
|
|
versionSpec: '16.x'
|
2020-06-12 08:18:20 -07:00
|
|
|
|
|
|
|
- task: Cache@2
|
2020-11-17 20:20:34 -07:00
|
|
|
displayName: 'Cache node_modules'
|
2020-06-12 08:18:20 -07:00
|
|
|
inputs:
|
2021-03-01 16:28:44 -07:00
|
|
|
key: 'npm | package-lock.json'
|
2020-06-12 08:18:20 -07:00
|
|
|
path: 'node_modules'
|
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- script: 'npm ci --no-audit'
|
2020-06-12 08:18:20 -07:00
|
|
|
displayName: 'Install Dependencies'
|
2020-11-17 20:20:34 -07:00
|
|
|
env:
|
|
|
|
SKIP_PREPARE: 'true'
|
2020-06-12 08:18:20 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- script: 'npm run build:development'
|
2020-06-12 08:18:20 -07:00
|
|
|
displayName: 'Build Development'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'development')
|
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- script: 'npm run build:production'
|
2020-06-12 08:18:20 -07:00
|
|
|
displayName: 'Build Production'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'production')
|
|
|
|
|
|
|
|
- script: 'test -d dist'
|
|
|
|
displayName: 'Check Build'
|
|
|
|
|
|
|
|
- script: 'mv dist jellyfin-web'
|
|
|
|
displayName: 'Rename Directory'
|
|
|
|
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: 'Archive Directory'
|
|
|
|
inputs:
|
|
|
|
rootFolderOrFile: 'jellyfin-web'
|
|
|
|
includeRootFolder: true
|
|
|
|
archiveFile: 'jellyfin-web-$(BuildConfiguration)'
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
displayName: 'Publish Release'
|
|
|
|
inputs:
|
|
|
|
targetPath: '$(Build.SourcesDirectory)/jellyfin-web-$(BuildConfiguration).zip'
|
|
|
|
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|