Skip to content

Commit 073ecc0

Browse files
authored
Merge pull request #650 from microsoft/ci/release-please-to-v1
ci/release please to v1
2 parents f37bdce + f07f4ca commit 073ecc0

File tree

8 files changed

+125
-32
lines changed

8 files changed

+125
-32
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ trigger:
88
include:
99
- main
1010
- support/v1
11+
tags:
12+
include:
13+
- 'v*'
1114
pr:
1215
branches:
1316
include:
@@ -147,7 +150,7 @@ extends:
147150

148151
- task: PowerShell@2
149152
displayName: 'Validate project version has been incremented'
150-
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'), contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
153+
condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
151154
inputs:
152155
targetType: 'filePath'
153156
filePath: $(System.DefaultWorkingDirectory)\scripts\ValidateProjectVersionUpdated.ps1
@@ -188,7 +191,7 @@ extends:
188191
PendingAnalysisWaitTimeoutMinutes: '5'
189192

190193
- stage: deploy
191-
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'), contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
194+
condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
192195
dependsOn: build
193196
jobs:
194197
- deployment: deploy
@@ -232,7 +235,7 @@ extends:
232235
steps:
233236
- pwsh: |
234237
$artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
235-
$artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.OData", "" -replace ".nupkg", ""
238+
$artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.OData.", "" -replace ".nupkg", ""
236239
#Set Variable $artifactName and $artifactVersion
237240
Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
238241
echo "$artifactVersion"
@@ -242,18 +245,10 @@ extends:
242245
condition: succeededOrFailed()
243246
inputs:
244247
gitHubConnection: 'Github-MaggieKimani1'
245-
action: create
248+
action: edit
246249
tagSource: userSpecifiedTag
247250
tag: 'v$(artifactVersion)'
248251
title: 'v$(artifactVersion)'
249252
releaseNotesSource: inline
250-
assets: '$(Pipeline.Workspace)\**\*.nupkg'
251-
changeLogType: issueBased
252-
changeLogLabels: '[
253-
{ "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
254-
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
255-
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
256-
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
257-
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
258-
]'
259-
253+
assets: '$(Pipeline.Workspace)\**\*.nupkg'
254+
addChangeLog: false

.github/release-please.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
manifest: true
2+
primaryBranch: main
3+
handleGHRelease: true
4+
branches:
5+
- branch: support/v1
6+
manifest: true
7+
handleGHRelease: true

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.7.4"
3+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing to OpenAPI.net.OData
2+
3+
OpenAPI.net.OData is a mono-repo containing source code for the following packages:
4+
5+
## Libraries
6+
7+
| Library | NuGet Release |
8+
|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9+
| [Microsoft.OpenAPI.OData](./README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI.OData?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI.OData/) |
10+
11+
OpenAPI.net.OData is open to contributions. There are a couple of different recommended paths to get contributions into the released version of this library.
12+
13+
__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository.
14+
15+
## File issues
16+
17+
The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. Discussions on bugs and potential fixes could point you to the write change to make.
18+
19+
## Submit pull requests for bug fixes and features
20+
21+
Feel free to submit a pull request with a linked issue against the __main__ branch. The main branch will be updated frequently.
22+
## Commit message format
23+
24+
To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
25+
format.
26+
Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and
27+
MUST have a __type__ (see below for a list of types) and a __description__. An optional __scope__ can be added to the header to give extra context.
28+
29+
```
30+
<type>[optional scope]: <short description>
31+
<BLANK LINE>
32+
<optional body>
33+
<BLANK LINE>
34+
<optional footer(s)>
35+
```
36+
37+
The recommended commit types used are:
38+
39+
- __feat__ for feature updates (increments the _minor_ version)
40+
- __fix__ for bug fixes (increments the _patch_ version)
41+
- __perf__ for performance related changes e.g. optimizing an algorithm
42+
- __refactor__ for code refactoring changes
43+
- __test__ for test suite updates e.g. adding a test or fixing a test
44+
- __style__ for changes that don't affect the meaning of code. e.g. formatting changes
45+
- __docs__ for documentation updates e.g. ReadMe update or code documentation updates
46+
- __build__ for build system changes (gradle updates, external dependency updates)
47+
- __ci__ for CI configuration file changes e.g. updating a pipeline
48+
- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file
49+
50+
Adding an exclamation mark after the commit type (`feat!`) or footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version.

Directory.Build.props

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project>
2+
<PropertyGroup>
3+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4+
<Authors>Microsoft</Authors>
5+
<Company>Microsoft</Company>
6+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
7+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
8+
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET</RepositoryUrl>
9+
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
10+
<PackageReleaseNotes>https://github.com/microsoft/OpenAPI.NET.OData/releases</PackageReleaseNotes>
11+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
12+
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
13+
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
14+
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
15+
<PackageTags>Microsoft OpenApi OData EDM</PackageTags>
16+
<Version>1.7.4</Version>
17+
</PropertyGroup>
18+
<!-- https://github.com/clairernovotny/DeterministicBuilds#deterministic-builds -->
19+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
20+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
21+
</PropertyGroup>
22+
<ItemGroup>
23+
<PackageReference Condition="!$(MSBuildProjectName.EndsWith('Tests'))" Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
24+
</ItemGroup>
25+
</Project>

release-please-config.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"bootstrap-sha": "f69fea0e056e6de5a76b128e31ab580ec13356fa",
3+
"exclude-paths": [
4+
".azure-pipelines",
5+
".github",
6+
".idea",
7+
".vs",
8+
".vscode"
9+
],
10+
"release-type": "simple",
11+
"bump-minor-pre-major": true,
12+
"bump-patch-for-minor-pre-major": true,
13+
"include-component-in-tag": false,
14+
"include-v-in-tag": true,
15+
"draft": false,
16+
"packages": {
17+
".": {
18+
"package-name": "Microsoft.OpenApi.OData",
19+
"changelog-path": "CHANGELOG.md",
20+
"extra-files": [
21+
{
22+
"type": "xml",
23+
"path": "Directory.Build.props",
24+
"xpath": "//Project/PropertyGroup/Version"
25+
}
26+
]
27+
}
28+
},
29+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
30+
}

src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,12 @@
44
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
55
<LangVersion>Latest</LangVersion>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7-
<PackageIcon>icon.png</PackageIcon>
8-
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
9-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
10-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
11-
<Authors>Microsoft</Authors>
12-
<Company>Microsoft</Company>
137
<Title>Microsoft Open API OData Reader</Title>
148
<RootNamespace>Microsoft.OpenApi.OData</RootNamespace>
159
<TargetFrameworks>netstandard2.0</TargetFrameworks>
1610
<PackageId>Microsoft.OpenApi.OData</PackageId>
1711
<SignAssembly>true</SignAssembly>
18-
<Version>1.7.4</Version>
1912
<Description>This package contains the codes you need to convert OData CSDL to Open API Document of Model.</Description>
20-
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
21-
<PackageTags>Microsoft OpenApi OData EDM</PackageTags>
22-
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET.OData</RepositoryUrl>
23-
<PackageReleaseNotes>
24-
- Sync changes from https://github.com/microsoft/OpenAPI.NET.OData/pull/567 to V1 of the library
25-
</PackageReleaseNotes>
2613
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
2714
<AssemblyOriginatorKeyFile>..\..\tool\Microsoft.OpenApi.OData.snk</AssemblyOriginatorKeyFile>
2815
<OutputPath Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">..\..\bin\Debug\</OutputPath>
@@ -43,15 +30,10 @@
4330
</PackageReference>
4431
<PackageReference Include="Microsoft.OData.Edm" Version="7.21.6" />
4532
<PackageReference Include="Microsoft.OpenApi" Version="1.6.23" />
46-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
47-
<PrivateAssets>all</PrivateAssets>
48-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
49-
</PackageReference>
5033
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
5134
</ItemGroup>
5235

5336
<ItemGroup>
54-
<None Include="icon.png" Pack="true" PackagePath="\" />
5537
<Compile Update="Properties\SRResource.Designer.cs">
5638
<DesignTime>True</DesignTime>
5739
<AutoGen>True</AutoGen>

0 commit comments

Comments
 (0)