mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-16 02:18:16 -07:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
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:
|
|
versionSpec: '16.x'
|
|
|
|
- task: Cache@2
|
|
displayName: 'Cache node_modules'
|
|
inputs:
|
|
key: 'npm | package-lock.json'
|
|
path: 'node_modules'
|
|
|
|
- script: 'npm ci --no-audit'
|
|
displayName: 'Install Dependencies'
|
|
env:
|
|
SKIP_PREPARE: 'true'
|
|
|
|
- script: 'npm run build:development'
|
|
displayName: 'Build Development'
|
|
condition: eq(variables['BuildConfiguration'], 'development')
|
|
|
|
- script: 'npm run build:production'
|
|
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)'
|