matrixion/.ci/azure-build.yml

82 lines
3.3 KiB
YAML
Raw Normal View History

2019-05-18 04:17:18 +03:00
2019-05-18 03:44:32 +03:00
steps:
2019-05-18 18:29:55 +03:00
- bash: mkdir -p ${ARTIFACT_STAGING_DIRECTORY}
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
2019-05-19 00:16:42 +03:00
name: createStaging
2019-05-18 04:17:18 +03:00
- bash: |
2019-05-18 03:44:32 +03:00
export CXX=${CXX_COMPILER}
export CC=${C_COMPILER}
# Use TRAVIS_TAG if defined, or the short commit SHA otherwise
export VERSION=${TRAVIS_TAG:-$(git rev-parse --short HEAD)}
2019-05-18 06:30:43 +03:00
./.ci/install.sh
export PATH=/usr/local/bin:${PATH}
2019-05-18 03:44:32 +03:00
./.ci/script.sh
sed -i -e "s/VERSION_NAME_VALUE/${VERSION}/g" ./.ci/bintray-release.json || true
2019-05-18 06:30:43 +03:00
cp ./.ci/bintray-release.json .
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
2019-05-19 00:16:42 +03:00
name: build
displayName: build
# - task: CopyFiles@2
# inputs:
# sourceFolder: $(Build.Repository.LocalPath) # Optional
# contents: |
# '**/nheko*.dmg'
# '**/nheko*.AppImage'
# targetFolder: $(Build.ArtifactStagingDirectory)
# #cleanTargetFolder: false # Optional
# overWrite: true # Optional
# flattenFolders: true # Optional
2019-05-18 07:53:25 +03:00
# Create a variable for build success
2019-05-19 00:16:42 +03:00
- bash: |
echo ${ARTIFACT_STAGING_DIRECTORY}
ls ${ARTIFACT_STAGING_DIRECTORY}
2019-05-18 18:02:58 +03:00
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
2019-05-18 22:35:10 +03:00
- pwsh: if( (Get-ChildItem $ENV:ARTIFACT_STAGING_DIRECTORY | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' }
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
2019-05-19 00:16:42 +03:00
name: buildCheck
2019-05-18 07:21:20 +03:00
- task: GitHubRelease@0
2019-05-18 23:17:36 +03:00
condition: eq(variables['buildSuccess'], 'true')
2019-05-18 23:00:41 +03:00
continueOnError: true
2019-05-19 00:16:42 +03:00
name: GitHubRelease
2019-05-18 07:21:20 +03:00
inputs:
gitHubConnection: nheko-reborn-pipeline
repositoryName: '$(Build.Repository.Name)'
2019-05-18 23:44:06 +03:00
action: 'create' # Options: create, edit, delete
2019-05-18 07:21:20 +03:00
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tagSource: 'manual' # Required when action == Create# Options: auto, manual
tag: $(Build.BuildNumber) # Required when action == Edit || Action == Delete || TagSource == Manual
#title: # Optional
2019-05-19 00:16:42 +03:00
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: CHANGELOG.md # Optional
2019-05-18 07:21:20 +03:00
#releaseNotes: # Optional
#assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
2019-05-18 23:44:06 +03:00
assetUploadMode: 'delete' # Optional. Options: delete, replace
2019-05-18 07:21:20 +03:00
#isDraft: false # Optional
2019-05-18 23:44:06 +03:00
isPreRelease: true # Optional
addChangeLog: true # Optional
# If the release already exists, edit it instead.
2019-05-18 06:30:43 +03:00
- task: GitHubRelease@0
2019-05-18 23:01:30 +03:00
condition: eq(variables['buildSuccess'], 'true')
2019-05-18 23:00:41 +03:00
continueOnError: true
2019-05-18 06:30:43 +03:00
inputs:
2019-05-18 06:37:52 +03:00
gitHubConnection: nheko-reborn-pipeline
2019-05-18 06:30:43 +03:00
repositoryName: '$(Build.Repository.Name)'
2019-05-18 23:44:06 +03:00
action: 'edit' # Options: create, edit, delete
2019-05-18 06:30:43 +03:00
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tagSource: 'manual' # Required when action == Create# Options: auto, manual
tag: $(Build.BuildNumber) # Required when action == Edit || Action == Delete || TagSource == Manual
2019-05-18 06:30:43 +03:00
#title: # Optional
2019-05-19 00:16:42 +03:00
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: CHANGELOG.md # Optional
2019-05-18 06:30:43 +03:00
#releaseNotes: # Optional
2019-05-18 23:44:06 +03:00
#assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
2019-05-18 06:30:43 +03:00
assetUploadMode: 'delete' # Optional. Options: delete, replace
#isDraft: false # Optional
isPreRelease: true # Optional
addChangeLog: true # Optional