代码拉取完成,页面将自动刷新
同步操作将从 sscms/cms 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
variables:
netCoreSdkVersion: '7.0.101'
buildConfiguration: 'Release'
imageName: 'sscms/core'
productVersion: '7.2.0'
jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- task: UseDotNet@2
inputs:
version: $(netCoreSdkVersion)
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: npm install
- script: npm run build-win-x64
- task: NuGetToolInstaller@1
inputs:
versionSpec: 6.4.0
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: './build-win-x64/build.sln'
feedsToUse: 'select'
- script: dotnet build ./build-win-x64/build.sln -c $(buildConfiguration)
- script: dotnet publish ./build-win-x64/src/SSCMS.Cli/SSCMS.Cli.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-win-x64
- script: dotnet publish ./build-win-x64/src/SSCMS.Web/SSCMS.Web.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-win-x64
- script: npm run copy-win-x64
- script: npm run build-win-x86
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: './build-win-x86/build.sln'
feedsToUse: 'select'
- script: dotnet build ./build-win-x86/build.sln -c $(buildConfiguration)
- script: dotnet publish ./build-win-x86/src/SSCMS.Cli/SSCMS.Cli.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-win-x86
- script: dotnet publish ./build-win-x86/src/SSCMS.Web/SSCMS.Web.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-win-x86
- script: npm run copy-win-x86
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: './publish/sscms-$(productVersion)-win-x64'
archiveType: 'zip'
includeRootFolder: false
archiveFile: './publish/dist/sscms-$(productVersion)-win-x64.zip'
- script: npm run publish-win-x64-zip
env:
OSS_ACCESS_KEY_ID: $(ossAccessKeyId)
OSS_SECRET_ACCESS_KEY: $(ossSecretAccessKey)
OSS_BUCKET_DL: $(ossBucketDl)
OSS_BUCKET_WWW: $(ossBucketWww)
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: './publish/sscms-$(productVersion)-win-x86'
archiveType: 'zip'
includeRootFolder: false
archiveFile: './publish/dist/sscms-$(productVersion)-win-x86.zip'
- script: npm run publish-win-x86-zip
env:
OSS_ACCESS_KEY_ID: $(ossAccessKeyId)
OSS_SECRET_ACCESS_KEY: $(ossSecretAccessKey)
OSS_BUCKET_DL: $(ossBucketDl)
OSS_BUCKET_WWW: $(ossBucketWww)
- task: PublishPipelineArtifact@1
inputs:
targetPath: './publish/dist'
artifactName: 'sscms-$(productVersion)-win'
- job: Linux
pool:
vmImage: 'Ubuntu 20.04'
steps:
- task: UseDotNet@2
inputs:
version: $(netCoreSdkVersion)
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: npm install
- script: npm run build-linux-x64
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: './build-linux-x64/build.sln'
feedsToUse: 'select'
- script: dotnet build ./build-linux-x64/build.sln -c $(buildConfiguration)
- script: dotnet publish ./build-linux-x64/src/SSCMS.Cli/SSCMS.Cli.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-linux-x64
- script: dotnet publish ./build-linux-x64/src/SSCMS.Web/SSCMS.Web.csproj -c $(buildConfiguration) -o ./publish/sscms-$(productVersion)-linux-x64
- script: npm run copy-linux-x64
- script: npm run build-linux-arm64
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: './build-linux-arm64/build.sln'
feedsToUse: 'select'
- script: dotnet build ./build-linux-arm64/build.sln -c $(buildConfiguration)
- script: dotnet publish ./build-linux-arm64/src/SSCMS.Cli/SSCMS.Cli.csproj -c $(buildConfiguration) -r linux-arm64 -o ./publish/sscms-$(productVersion)-linux-arm64
- script: dotnet publish ./build-linux-arm64/src/SSCMS.Web/SSCMS.Web.csproj -c $(buildConfiguration) -r linux-arm64 -o ./publish/sscms-$(productVersion)-linux-arm64
- script: npm run copy-linux-arm64
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: './publish/sscms-$(productVersion)-linux-x64'
archiveType: 'tar'
tarCompression: 'gz'
includeRootFolder: false
archiveFile: './publish/dist/sscms-$(productVersion)-linux-x64.tar.gz'
- script: npm run publish-linux-x64-tgz
env:
OSS_ACCESS_KEY_ID: $(ossAccessKeyId)
OSS_SECRET_ACCESS_KEY: $(ossSecretAccessKey)
OSS_BUCKET_DL: $(ossBucketDl)
OSS_BUCKET_WWW: $(ossBucketWww)
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: './publish/sscms-$(productVersion)-linux-x64'
archiveType: 'zip'
includeRootFolder: false
archiveFile: './publish/dist/sscms-$(productVersion)-linux-x64.zip'
- script: npm run publish-linux-x64-zip
env:
OSS_ACCESS_KEY_ID: $(ossAccessKeyId)
OSS_SECRET_ACCESS_KEY: $(ossSecretAccessKey)
OSS_BUCKET_DL: $(ossBucketDl)
OSS_BUCKET_WWW: $(ossBucketWww)
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: './publish/sscms-$(productVersion)-linux-arm64'
archiveType: 'tar'
tarCompression: 'gz'
includeRootFolder: false
archiveFile: './publish/dist/sscms-$(productVersion)-linux-arm64.tar.gz'
- script: npm run publish-linux-arm64-tgz
env:
OSS_ACCESS_KEY_ID: $(ossAccessKeyId)
OSS_SECRET_ACCESS_KEY: $(ossSecretAccessKey)
OSS_BUCKET_DL: $(ossBucketDl)
OSS_BUCKET_WWW: $(ossBucketWww)
- task: PublishPipelineArtifact@1
inputs:
targetPath: './publish/dist'
artifactName: 'sscms-$(productVersion)-linux'
- script: docker build -f docker/Dockerfile.core --no-cache -t $(imageName):latest -t $(imageName):$(productVersion) .
- task: Docker@2
displayName: Push image
inputs:
containerRegistry: |
docker
repository: $(imageName)
command: push
tags: |
latest
$(productVersion)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。