pipelines
This commit is contained in:
parent
376a2c8c0e
commit
991abbd013
3 changed files with 132 additions and 9997 deletions
|
@ -1,20 +1,134 @@
|
||||||
# Node.js
|
# Cider-1 Azure Pipeline Workflow
|
||||||
# Build a general Node.js project with npm.
|
# Maintained by Cider Devops.
|
||||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
# Don't make changes unless you know what you're doing.
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- stable
|
branches:
|
||||||
|
include:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/**/*
|
||||||
|
- src-electron/**/*
|
||||||
|
- azure-pipelines.yml
|
||||||
|
|
||||||
pool: default
|
variables:
|
||||||
|
COMMIT_URL: "$(Build.Repository.Uri)/commit/$(Build.SourceVersion)"
|
||||||
|
BUILD_URL: "$(System.CollectionUri)/$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
|
||||||
|
YARN_CONFIG_CACHE: $(Pipeline.Workspace)/.yarn/cache
|
||||||
|
|
||||||
steps:
|
jobs:
|
||||||
- task: NodeTool@0
|
|
||||||
|
# Linux Production Build Test
|
||||||
|
# This job is used to test the production build of the Linux distribution.
|
||||||
|
# Also tests Pull Requests.
|
||||||
|
- job: compile_linux
|
||||||
|
displayName: "Compile Linux Distribution"
|
||||||
|
pool: Linux
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: "Install Node.js"
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '10.x'
|
versionSource: "fromFile"
|
||||||
displayName: 'Install Node.js'
|
versionFilePath: ".nvmrc"
|
||||||
|
|
||||||
|
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- task: Cache@2
|
||||||
|
inputs:
|
||||||
|
key: 'yarn | "$(Agent.OS)" | yarn.lock'
|
||||||
|
path: $(YARN_CONFIG_CACHE)
|
||||||
|
displayName: Cache yarn
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
corepack enable
|
||||||
|
corepack prepare pnpm@latest --activate
|
||||||
|
pnpm config set store-dir $(PNPM_CONFIG_CACHE)
|
||||||
|
displayName: "Setup pnpm"
|
||||||
|
|
||||||
|
# Install dependencies (frozen-lockfile for non-PR builds)
|
||||||
|
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- script: yarn --immutable
|
||||||
|
displayName: "Install Dependencies"
|
||||||
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- script: yarn
|
||||||
|
displayName: "Install Dependencies"
|
||||||
|
|
||||||
|
- script: yarn dist:linux
|
||||||
|
displayName: "Compile Distribution"
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: "Copy to artifacts staging directory"
|
||||||
|
inputs:
|
||||||
|
SourceFolder: "dist"
|
||||||
|
Contents: "*.AppImage"
|
||||||
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Upload Artifacts
|
||||||
|
inputs:
|
||||||
|
ArtifactName: "Cider-2"
|
||||||
|
publishLocation: "Container"
|
||||||
|
|
||||||
|
- task: DownloadBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
downloadType: 'specific'
|
||||||
|
downloadPath: '$(System.ArtifactsDirectory)'
|
||||||
|
|
||||||
|
# Windows Production Build Test
|
||||||
|
# This job is used to test the production build of the Windows distribution.
|
||||||
|
# Also tests Pull Requests.
|
||||||
|
- job: compile_windows
|
||||||
|
displayName: "Compile Windows Distribution"
|
||||||
|
pool: Linux
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: "Install Node.js"
|
||||||
|
inputs:
|
||||||
|
versionSource: "fromFile"
|
||||||
|
versionFilePath: ".nvmrc"
|
||||||
|
|
||||||
|
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- task: Cache@2
|
||||||
|
inputs:
|
||||||
|
key: 'yarn | "$(Agent.OS)" | yarn.lock'
|
||||||
|
path: $(YARN_CONFIG_CACHE)
|
||||||
|
displayName: Cache yarn
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
corepack enable
|
||||||
|
corepack prepare pnpm@latest --activate
|
||||||
|
pnpm config set store-dir $(PNPM_CONFIG_CACHE)
|
||||||
|
displayName: "Setup pnpm"
|
||||||
|
|
||||||
|
# Install dependencies (frozen-lockfile for non-PR builds)
|
||||||
|
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- script: yarn --immutable
|
||||||
|
displayName: "Install Dependencies"
|
||||||
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
|
- script: yarn
|
||||||
|
displayName: "Install Dependencies"
|
||||||
|
|
||||||
|
- script: yarn dist:win
|
||||||
|
displayName: "Compile Distribution"
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: "Copy to artifacts staging directory"
|
||||||
|
inputs:
|
||||||
|
SourceFolder: "dist"
|
||||||
|
Contents: "*.exe"
|
||||||
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Upload Artifacts
|
||||||
|
inputs:
|
||||||
|
ArtifactName: "Cider-2"
|
||||||
|
publishLocation: "Container"
|
||||||
|
|
||||||
|
- task: DownloadBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
downloadType: 'specific'
|
||||||
|
downloadPath: '$(System.ArtifactsDirectory)'
|
||||||
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
displayName: 'npm install and build'
|
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
"build": "tsc && lessc ./src/renderer/style.less ./src/renderer/style.css",
|
"build": "tsc && lessc ./src/renderer/style.less ./src/renderer/style.css",
|
||||||
"start": "npm run build && electron ./build/index.js",
|
"start": "npm run build && electron ./build/index.js",
|
||||||
"dist": "npm run build && electron-builder",
|
"dist": "npm run build && electron-builder",
|
||||||
|
"dist:win": "npm run build && electron-builder --win",
|
||||||
|
"dist:linux": "npm run build && electron-builder --linux",
|
||||||
"dist:universalNotWorking": "npm run build && electron-builder --mac --universal",
|
"dist:universalNotWorking": "npm run build && electron-builder --mac --universal",
|
||||||
"winget": "npm run build && electron-builder --win -c winget.json",
|
"winget": "npm run build && electron-builder --win -c winget.json",
|
||||||
"msft": "npm run build && electron-builder -c msft-package.json",
|
"msft": "npm run build && electron-builder -c msft-package.json",
|
||||||
|
@ -31,7 +33,7 @@
|
||||||
"@sentry/electron": "^4.2.0",
|
"@sentry/electron": "^4.2.0",
|
||||||
"@sentry/integrations": "^7.31.1",
|
"@sentry/integrations": "^7.31.1",
|
||||||
"adm-zip": "^0.5.10",
|
"adm-zip": "^0.5.10",
|
||||||
"airtunes2": "github:ciderapp/node_airtunes2#2.4.2",
|
"airtunes2": "github:ciderapp/node_airtunes2",
|
||||||
"castv2-client": "^1.2.0",
|
"castv2-client": "^1.2.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"discord-auto-rpc": "^1.0.17",
|
"discord-auto-rpc": "^1.0.17",
|
||||||
|
|
9981
pnpm-lock.yaml
generated
9981
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue