-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathazure-pipelines.yml
81 lines (70 loc) · 2.48 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
trigger:
- main
jobs:
- job: 'BuildFigmaSharpMac'
pool:
vmImage: 'macOS-10.15'
variables:
- name: SOURCES_DIRECTORY
value: $(Build.SourcesDirectory)
- name: SOURCE_VERSION
value: $(Build.SourceVersion)
- name: ARTIFACT_STAGING_DIRECTORY
value: $(Build.ArtifactStagingDirectory)
steps:
- task: Bash@3
name: 'BuildMacApp'
inputs:
targetType: 'inline'
script: |
msbuild tools/FigmaSharpApp/FigmaSharpApp.csproj /p:"Configuration=Release;Platform=AnyCPU" /restore
- task: Bash@3
name: 'BuildMacExtension'
inputs:
targetType: 'inline'
script: |
msbuild tools/MonoDevelop.Figma/MonoDevelop.Figma.csproj /p:Configuration=Release /p:InstallAddin=true /restore
- task: ArchiveFiles@2
name: 'PrepareMacApp'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/tools/FigmaSharpApp/bin/Release/FigmaSharpApp.app'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/FigmaSharpApp-$(Build.SourceVersion).zip'
replaceExistingArchive: true
- task: Bash@3
name: 'PrepareMacExtension'
inputs:
targetType: 'inline'
script: |
mv ${SOURCES_DIRECTORY}/tools/MonoDevelop.Figma/bin/Release/*/*.mpack ${SOURCES_DIRECTORY}/FigmaSharpExtension-${SOURCE_VERSION}.mpack
- task: CopyFiles@2
name: 'CopyMacExtension'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: 'FigmaSharpExtension-*.mpack'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
name: 'PublishMacApp'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/FigmaSharpApp-$(Build.SourceVersion).zip'
ArtifactName: 'MacBuilds'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
name: 'PublishMacExtension'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/FigmaSharpExtension-$(Build.SourceVersion).mpack'
ArtifactName: 'MacBuilds'
publishLocation: 'Container'
- task: GitHubRelease@1
name: 'PublishToGitHub'
inputs:
gitHubConnection: 'github.com_hbons'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
target: '$(Build.SourceVersion)'
tag: 'ci'
title: 'Latest builds from Azure Pipelines'
assetUploadMode: 'replace'
isPreRelease: true
addChangeLog: false