Skip to content

Commit 41e51d2

Browse files
committed
build: Add step for packaging the Unity custom package
1 parent 779f810 commit 41e51d2

1 file changed

Lines changed: 50 additions & 16 deletions

File tree

azure-pipelines.yml

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,28 @@ jobs:
5252
inputs:
5353
platform: '$(buildPlatform)'
5454
configuration: '$(buildConfiguration)'
55+
- task: CopyFiles@2
56+
displayName: "Copy buttplug files to unity runtime"
57+
condition: and(succeeded(), eq(variables['buildConfiguration'], 'Release'))
58+
inputs:
59+
contents: "$(System.DefaultWorkingDirectory)/Buttplug/bin/Release/net47/*.dll"
60+
targetFolder: '$(System.DefaultWorkingDirectory/ButtplugUnity/Runtime'
61+
cleanTargetFolder: true
62+
- task: CopyFiles@2
63+
displayName: "Copy buttplug websocket files to unity runtime"
64+
condition: and(succeeded(), eq(variables['buildConfiguration'], 'Release'))
65+
inputs:
66+
contents: "$(System.DefaultWorkingDirectory)/Buttplug.Client.Connectors.WebsocketConnector/bin/Release/net47/*.dll"
67+
targetFolder: '$(System.DefaultWorkingDirectory/ButtplugUnity/Runtime'
68+
cleanTargetFolder: true
69+
- task: ArchiveFiles@2
70+
displayName: "Archive unity artifacts"
71+
condition: and(succeeded(), eq(variables['buildConfiguration'], 'Release'))
72+
inputs:
73+
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/ButtplugUnity"
74+
archiveType: "zip"
75+
archiveFile: "$(Build.ArtifactStagingDirectory)/buttplug-unity-$(gitVersion).zip"
76+
includeRootFolder: true
5577
- task: CopyFiles@2
5678
displayName: "Copy nuget packages to staging"
5779
inputs:
@@ -130,20 +152,32 @@ jobs:
130152
inputs:
131153
buildType: 'current'
132154
# Upload coverage to codecov.io
133-
- task: PowerShell@2
155+
# - task: PowerShell@2
156+
# inputs:
157+
# targetType: inline
158+
# script: |
159+
# cinst -y --no-progress codecov
160+
# codecov.exe -f "$(System.ArtifactsDirectory)/artifacts-Debug/coverage.xml" -t $(CODECOV_TOKEN)
161+
# displayName: Upload coverage to codecov.
162+
# continueOnError: true
163+
# - task: NuGetCommand@2
164+
# displayName: "Push NuGet packages to NuGet.org"
165+
# condition: succeeded()
166+
# inputs:
167+
# command: "push"
168+
# nuGetFeedType: "external"
169+
# packagesToPush: "$(System.ArtifactsDirectory)/artifacts-Release/**/!(*.symbols).nupkg"
170+
# allowPackageConflicts: false
171+
# publishFeedCredentials: "NuGet.org"
172+
- task: GitHubRelease@0
173+
displayName: Upload Unity zip to Github
174+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
134175
inputs:
135-
targetType: inline
136-
script: |
137-
cinst -y --no-progress codecov
138-
codecov.exe -f "$(System.ArtifactsDirectory)/artifacts-Debug/coverage.xml" -t $(CODECOV_TOKEN)
139-
displayName: Upload coverage to codecov.
140-
continueOnError: true
141-
- task: NuGetCommand@2
142-
displayName: "Push NuGet packages to NuGet.org"
143-
condition: succeeded()
144-
inputs:
145-
command: "push"
146-
nuGetFeedType: "external"
147-
packagesToPush: "$(System.ArtifactsDirectory)/artifacts-Release/**/!(*.symbols).nupkg"
148-
allowPackageConflicts: false
149-
publishFeedCredentials: "NuGet.org"
176+
gitHubConnection: "release"
177+
repositoryName: "buttplugio/buttplug-csharp"
178+
action: "create"
179+
tagSource: "auto"
180+
title: "Buttplug Unity Release"
181+
assets: |
182+
$(System.ArtifactsDirectory)\**\buttplug-unity-*.zip
183+
isPreRelease: false

0 commit comments

Comments
 (0)