2019-05-18 04:17:18 +03:00
|
|
|
|
2019-05-18 03:44:32 +03:00
|
|
|
steps:
|
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 .
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
#sourceFolder: # Optional
|
|
|
|
contents: |
|
2019-05-18 07:13:31 +03:00
|
|
|
'nheko*.dmg'
|
|
|
|
'nheko*.AppImage'
|
2019-05-18 06:30:43 +03:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
#cleanTargetFolder: false # Optional
|
|
|
|
#overWrite: false # Optional
|
|
|
|
#flattenFolders: false # Optional
|
2019-05-18 07:53:25 +03:00
|
|
|
# Create a variable for build success
|
2019-05-18 17:56:57 +03:00
|
|
|
- bash: ls ${BUILD.ARTIFACTSTAGINGDIRECTORY}
|
2019-05-18 07:53:25 +03:00
|
|
|
- pwsh: if( (Get-ChildItem $(Build.ArtifactStagingDirectory) | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' }
|
2019-05-18 17:56:57 +03:00
|
|
|
# delete the release if it already exists to avoid an error
|
2019-05-18 07:21:20 +03:00
|
|
|
- task: GitHubRelease@0
|
2019-05-18 07:56:55 +03:00
|
|
|
condition: and(succeeded(), eq(variables['buildSuccess'], 'true') )
|
2019-05-18 07:21:20 +03:00
|
|
|
inputs:
|
|
|
|
gitHubConnection: nheko-reborn-pipeline
|
|
|
|
repositoryName: '$(Build.Repository.Name)'
|
|
|
|
action: 'delete' # Options: create, edit, delete
|
|
|
|
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
|
|
|
|
#releaseNotesSource: 'file' # Optional. Options: file, input
|
|
|
|
#releaseNotesFile: CHANGELOG.md # Optional
|
|
|
|
#releaseNotes: # Optional
|
|
|
|
#assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
|
|
|
|
#assetUploadMode: 'delete' # Optional. Options: delete, replace
|
|
|
|
#isDraft: false # Optional
|
|
|
|
#isPreRelease: true # Optional
|
|
|
|
#addChangeLog: true # Optional
|
2019-05-18 06:30:43 +03:00
|
|
|
- task: GitHubRelease@0
|
2019-05-18 17:56:57 +03:00
|
|
|
condition: and(succeeded(), eq(variables['buildSuccess'], '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)'
|
|
|
|
action: 'create' # Options: create, edit, delete
|
|
|
|
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
|
2019-05-18 06:47:53 +03:00
|
|
|
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
|
|
|
|
releaseNotesSource: 'file' # Optional. Options: file, input
|
|
|
|
releaseNotesFile: CHANGELOG.md # Optional
|
|
|
|
#releaseNotes: # Optional
|
|
|
|
assets: '$(Build.ArtifactStagingDirectory)/*' # Optional
|
|
|
|
assetUploadMode: 'delete' # Optional. Options: delete, replace
|
|
|
|
#isDraft: false # Optional
|
|
|
|
isPreRelease: true # Optional
|
|
|
|
addChangeLog: true # Optional
|