1 Star 0 Fork 379

gnr2009/cms

forked from sscms/cms 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
azure-pipelines.yml 4.72 KB
一键复制 编辑 原始数据 按行查看 历史
sscms 提交于 2022-05-04 15:22 . 7.1.2
# 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: '6.0.100'
buildConfiguration: 'Release'
imageName: 'sscms/core'
productVersion: '7.1.2'
jobs:
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
inputs:
version: $(netCoreSdkVersion)
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: npm install
- script: npm run build-win-x64
- 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
- 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
- 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: 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)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/wqdegitee/cms.git
[email protected]:wqdegitee/cms.git
wqdegitee
cms
cms
master

搜索帮助