You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/.azuredevops/pipelines/publish-job.yml

117 lines
3.3 KiB

5 years ago
5 years ago
variables:
- template: templates/variables.yml
stages:
- stage: build
jobs:
- job: Build
pool:
vmImage: ${{ variables.vmImage }}
steps:
- template: templates/build-steps.yml
- stage: publish
jobs:
- job:
strategy:
matrix:
win10-x64:
runtime: win10-x64
format: zip
5 years ago
compression: zip
win10-x86:
runtime: win10-x86
format: zip
5 years ago
compression: zip
osx-x64:
runtime: osx-x64
format: tar.gz
5 years ago
compression: tar
linux-x64:
runtime: linux-x64
format: tar.gz
5 years ago
compression: tar
linux-arm:
runtime: linux-arm
format: tar.gz
5 years ago
compression: tar
linux-arm64:
runtime: linux-arm64
format: tar.gz
5 years ago
compression: tar
pool:
vmImage: ${{ variables.vmImage }}
steps:
- template: templates/publish-os-steps.yml
5 years ago
- stage: deploy
jobs:
- job:
4 years ago
condition: and(succeeded(), eq(variables.isMain, true))
steps:
5 years ago
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
targetPath: '$(System.ArtifactsDirectory)'
- task: PowerShell@2
displayName: 'Get Release Notes'
inputs:
targetType: 'inline'
script: |
$response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)"
Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response"
- task: GitHubRelease@1
displayName: 'Ombi.Releases Release'
inputs:
gitHubConnection: 'PAT'
repositoryName: 'Ombi-app/Ombi.Releases'
action: 'create'
target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672'
tagSource: 'userSpecifiedTag'
tag: '$(gitTag)'
releaseNotesSource: 'inline'
releaseNotesInline: '$(ReleaseNotes)'
assets: |
$(System.ArtifactsDirectory)/**/*.zip
$(System.ArtifactsDirectory)/**/*.tar.gz
isPreRelease: true
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'
5 years ago
- task: GitHubRelease@1
displayName: 'Ombi Release'
inputs:
gitHubConnection: 'PAT'
repositoryName: 'Ombi-app/Ombi'
5 years ago
action: 'create'
target: '$(Build.SourceVersion)'
5 years ago
tagSource: 'userSpecifiedTag'
tag: '$(gitTag)'
releaseNotesSource: 'inline'
releaseNotesInline: '$(ReleaseNotes)'
assets: |
5 years ago
$(System.ArtifactsDirectory)/**/*.zip
5 years ago
$(System.ArtifactsDirectory)/**/*.tar.gz
5 years ago
isPreRelease: true
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'
- task: PowerShell@2
displayName: "Trigger APT build"
inputs:
targetType: 'inline'
script: |
$body = @{
"ref"="master"
"inputs"= @{"version"= "$(gitTag)"}
} | ConvertTo-Json
$header = @{
"Accept"="application/vnd.github.v3+json"
"Authorization"="${env:APTPAT}"
}
Invoke-RestMethod -Uri "https://api.github.com/repos/Ombi-app/Ombi.Apt/actions/workflows/build-deb.yml/dispatches" -Method 'Post' -Body $body -Headers $header