1 Star 0 Fork 386

捕风的汉子/cms

forked from sscms/cms 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 6.03 KB
一键复制 编辑 原始数据 按行查看 历史
sscms 提交于 2024-08-02 11:15 . 7.3.1
# 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: '8.0.201'
buildConfiguration: 'Release'
imageName: 'sscms/core'
productVersion: '7.3.1'
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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/lgx88/cms.git
git@gitee.com:lgx88/cms.git
lgx88
cms
cms
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385