加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 3.12 KB
一键复制 编辑 原始数据 按行查看 历史
New Future 提交于 2022-03-13 06:00 . ci(azure): remove python2.7 windows
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
batch: true
branches:
include:
- 'master'
- 'fix*'
- 'feat*'
- 'dev*'
tags:
include:
- "v*"
- "V*"
pr:
autoCancel: true
branches:
include:
- master
jobs:
- job: 'Windows'
pool:
vmImage: 'windows-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
pyinstaller.version: 'pyinstaller'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: python -m pip install --upgrade pip
displayName: 'Install dependencies'
- script: pip install $(pyinstaller.version)
name: 'pyinstaller'
- bash: sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${BUILD_SOURCEBRANCHNAME}/" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py
name: 'replaceBuild'
- script: pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
name: 'build'
- bash: dist/ddns.exe || test -e "config.json"
name: run
- script: copy .release\\*.bat dist
name: 'CopyRlease'
- bash: envsubst < .release/README.md > dist/README.md
name: ReplaceVersion
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: './dist/'
artifactName: 'ddns-win-$(python.version)'
- job: 'MacOS'
pool:
vmImage: 'macos-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
pyinstaller.version: 'pyinstaller'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: python -m pip install --upgrade pip
displayName: 'Install dependencies'
- script: pip install $(pyinstaller.version)
name: 'pyinstaller'
- bash: sed -i.temp -e "s/\${BUILD_SOURCEBRANCHNAME}/${BUILD_SOURCEBRANCHNAME}/" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py
name: 'replaceBuild'
- script: pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
name: 'build'
- script: ./dist/ddns || test -e "config.json"
name: 'test'
- script: cp dist/ddns dist/ddns-osx
name: 'CopyDist'
- script: cp .release/*.sh dist/ && cp .release/*.md dist/
name: 'CopyRlease'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: './dist/'
artifactName: 'ddns-mac-$(python.version)'
# release
# steps:
# - task: GitHubRelease@0
# displayName: 'GitHub release (edit)'
# inputs:
# gitHubConnection: 'github connection'
# repositoryName: NewFuture/DDNS
# action: edit
# tag: '$(Build.SourceBranchName)'
# releaseNotesFile: '$(System.DefaultWorkingDirectory)/DDNS/ddns-win-3.7/README.md'
# assets: |
# $(System.DefaultWorkingDirectory)/DDNS/ddns-win-3.7/*.exe
# $(System.DefaultWorkingDirectory)/DDNS/ddns-win-3.7/*.bat
# $(System.DefaultWorkingDirectory)/DDNS/ddns-mac-3.7/ddns-osx
# $(System.DefaultWorkingDirectory)/DDNS/ddns-mac-3.7/*.sh
# assetUploadMode: replace
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化