Skip to content

Commit 254eba1

Browse files
authored
Add NoReflection project to solution (#99)
***PUBLISH_RELEASE*** ***UPDATE_DEPENDENTS***
1 parent 0c3e03a commit 254eba1

File tree

6 files changed

+500
-24
lines changed

6 files changed

+500
-24
lines changed

azure-pipelines.yml

Lines changed: 96 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,40 +42,114 @@ jobs:
4242
steps:
4343

4444
# step from template @ nf-tools repo
45-
# all build, update and publish steps
46-
- template: azure-pipelines-templates/class-lib-build.yml@templates
45+
46+
# build steps only
47+
- template: azure-pipelines-templates/class-lib-build-only.yml@templates
4748
parameters:
4849
sonarCloudProject: 'nanoframework_lib-CoreLibrary'
49-
msbuildExtraParams: '/p:DefineConstants="NANOCLR_REFLECTION"'
50-
51-
##############################
52-
- job: Build_mscorlib_no_reflection
53-
condition: eq(variables['UPDATE_DEPENDENTS'], 'false')
54-
pool:
55-
vmImage: 'VS2017-Win2016'
5650

57-
variables:
58-
solution: '**/source/*.sln'
59-
buildPlatform: 'Any CPU'
60-
buildConfiguration: 'Release'
61-
nugetPackageName: 'nanoFramework.CoreLibrary.NoReflection'
62-
repoName: 'lib-CoreLibrary'
63-
64-
steps:
51+
# package steps
52+
- template: azure-pipelines-templates/class-lib-package.yml@templates
53+
parameters:
54+
nugetPackageName: 'nanoFramework.CoreLibrary'
6555

66-
# step from template @ nf-tools repo
67-
# all build, update and publish steps
68-
- template: azure-pipelines-templates/class-lib-build.yml@templates
56+
- template: azure-pipelines-templates/class-lib-package.yml@templates
6957
parameters:
70-
sonarCloudProject: 'nanoframework_lib-CoreLibrary.NoReflection'
58+
nugetPackageName: 'nanoFramework.CoreLibrary.NoReflection'
59+
60+
- template: azure-pipelines-templates/class-lib-publish.yml@templates
61+
62+
# need to push the other package to NuGet because the template above can only push one package (happens on tag builds for any branch)
63+
- task: NuGetCommand@2
64+
inputs:
65+
command: push
66+
nuGetFeedType: external
67+
allowPackageConflicts: true
68+
packagesToPush:
69+
$(Build.ArtifactStagingDirectory)/nanoFramework.CoreLibrary.NoReflection.$(MY_NUGET_VERSION).nupkg
70+
publishFeedCredentials: 'AzureArtifacts-CoreLibrary'
71+
condition: and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
72+
continueOnError: true
73+
displayName: Push "NoReflection" variant NuGet package to Azure Artifacts
74+
75+
- task: NuGetCommand@2
76+
inputs:
77+
command: push
78+
nuGetFeedType: external
79+
allowPackageConflicts: true
80+
packagesToPush:
81+
$(Build.ArtifactStagingDirectory)/nanoFramework.CoreLibrary.NoReflection.$(MY_NUGET_VERSION).nupkg
82+
publishFeedCredentials: 'NuGet-CoreLibrary'
83+
condition: and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
84+
continueOnError: true
85+
displayName: Push "NoReflection" variant NuGet package to Azure Artifacts
86+
87+
# create or update GitHub release
88+
- task: GitHubReleasePublish@1
89+
inputs:
90+
githubEndpoint: 'nanoframework'
91+
githubOwner: 'nanoframework'
92+
githubRepositoryName: $(repoName)
93+
githubTag: v$(MY_NUGET_VERSION)
94+
githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
95+
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br><h4>Install from nanoFramework Azure Artifacts development feed</h4><br>The following NuGet packages are available for download from this release:<br>:package: [.NET](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&view=overview&package=$(nugetPackageName)&protocolType=NuGet&version=$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)<br>:package: [.NET (without Reflection)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&view=overview&package=$(nugetPackageName).NoReflection&protocolType=NuGet&version=$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
96+
githubTargetCommitsh: $(Build.SourceVersion)
97+
githubReleaseDraft: $(RELEASE_DRAFT)
98+
githubReleasePrerelease: true
99+
githubReuseDraftOnly: false
100+
githubReuseRelease: true
101+
githubEditRelease: true
102+
githubDeleteEmptyTag: true
103+
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
104+
condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
105+
displayName: Create/Update GitHub release
106+
107+
# create or update GitHub release ON tags from release or master branches
108+
- task: GitHubReleasePublish@1
109+
inputs:
110+
githubEndpoint: 'nanoframework'
111+
githubOwner: 'nanoframework'
112+
githubRepositoryName: $(repoName)
113+
githubTag: v$(MY_NUGET_VERSION)
114+
githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
115+
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br><h4>Install from NuGet</h4><br>The following NuGet packages are available for download from this release:<br>:package: [.NET](https://www.nuget.org/packages/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).<br>:package: [.NET (without Reflection)](https://www.nuget.org/packages/$(nugetPackageName).NoReflection/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
116+
githubTargetCommitsh: $(Build.SourceVersion)
117+
githubReleaseDraft: $(RELEASE_DRAFT)
118+
githubReleasePrerelease: true
119+
githubReuseDraftOnly: false
120+
githubReuseRelease: true
121+
githubEditRelease: true
122+
githubDeleteEmptyTag: true
123+
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
124+
condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), contains(variables['Build.SourceBranch'], 'preview') )
125+
displayName: Create/Update GitHub PREVIEW release
126+
127+
# create or update GitHub release ON tags from release or master branches
128+
- task: GitHubReleasePublish@1
129+
inputs:
130+
githubEndpoint: 'nanoframework'
131+
githubOwner: 'nanoframework'
132+
githubRepositoryName: $(repoName)
133+
githubTag: v$(MY_NUGET_VERSION)
134+
githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
135+
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br><h4>Install from NuGet</h4><br>The following NuGet packages are available for download from this release:<br>:package: [.NET](https://www.nuget.org/packages/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).<br>:package: [.NET (without Reflection)](https://www.nuget.org/packages/$(nugetPackageName).NoReflection/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
136+
githubTargetCommitsh: $(Build.SourceVersion)
137+
githubReleaseDraft: false
138+
githubReleasePrerelease: false
139+
githubReuseDraftOnly: false
140+
githubReuseRelease: false
141+
githubEditRelease: false
142+
githubDeleteEmptyTag: true
143+
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
144+
condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), not(contains(variables['Build.SourceBranch'], 'preview') ) )
145+
displayName: Create/Update GitHub stable release
71146

72147
##############################
73148
- job: Update_Dependencies
74149
condition: and( ne( variables['StartReleaseCandidate'], true ), eq(variables['UPDATE_DEPENDENTS'], true) )
75150

76151
dependsOn:
77152
- Build_mscorlib
78-
- Build_mscorlib_no_reflection
79153

80154
pool:
81155
vmImage: 'VS2017-Win2016'
@@ -126,7 +200,6 @@ jobs:
126200

127201
dependsOn:
128202
- Build_mscorlib
129-
- Build_mscorlib_no_reflection
130203
- Update_Dependencies
131204
condition: or( failed('Build_mscorlib'), failed('Build_mscorlib_no_reflection'), failed('Update_Dependencies'))
132205

0 commit comments

Comments
 (0)