Skip to content

Commit

Permalink
Merge pull request #650 from microsoft/ci/release-please-to-v1
Browse files Browse the repository at this point in the history
ci/release please to v1
  • Loading branch information
baywet authored Feb 10, 2025
2 parents f37bdce + f07f4ca commit 073ecc0
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 32 deletions.
23 changes: 9 additions & 14 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ trigger:
include:
- main
- support/v1
tags:
include:
- 'v*'
pr:
branches:
include:
Expand Down Expand Up @@ -147,7 +150,7 @@ extends:

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

- stage: deploy
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'), contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
dependsOn: build
jobs:
- deployment: deploy
Expand Down Expand Up @@ -232,7 +235,7 @@ extends:
steps:
- pwsh: |
$artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
$artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.OData", "" -replace ".nupkg", ""
$artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.OData.", "" -replace ".nupkg", ""
#Set Variable $artifactName and $artifactVersion
Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
echo "$artifactVersion"
Expand All @@ -242,18 +245,10 @@ extends:
condition: succeededOrFailed()
inputs:
gitHubConnection: 'Github-MaggieKimani1'
action: create
action: edit
tagSource: userSpecifiedTag
tag: 'v$(artifactVersion)'
title: 'v$(artifactVersion)'
releaseNotesSource: inline
assets: '$(Pipeline.Workspace)\**\*.nupkg'
changeLogType: issueBased
changeLogLabels: '[
{ "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
]'

assets: '$(Pipeline.Workspace)\**\*.nupkg'
addChangeLog: false
7 changes: 7 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
manifest: true
primaryBranch: main
handleGHRelease: true
branches:
- branch: support/v1
manifest: true
handleGHRelease: true
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.7.4"
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing to OpenAPI.net.OData

OpenAPI.net.OData is a mono-repo containing source code for the following packages:

## Libraries

| Library | NuGet Release |
|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [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/) |

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.

__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.

## File issues

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.

## Submit pull requests for bug fixes and features

Feel free to submit a pull request with a linked issue against the __main__ branch. The main branch will be updated frequently.
## Commit message format

To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
format.
Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and
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.

```
<type>[optional scope]: <short description>
<BLANK LINE>
<optional body>
<BLANK LINE>
<optional footer(s)>
```

The recommended commit types used are:

- __feat__ for feature updates (increments the _minor_ version)
- __fix__ for bug fixes (increments the _patch_ version)
- __perf__ for performance related changes e.g. optimizing an algorithm
- __refactor__ for code refactoring changes
- __test__ for test suite updates e.g. adding a test or fixing a test
- __style__ for changes that don't affect the meaning of code. e.g. formatting changes
- __docs__ for documentation updates e.g. ReadMe update or code documentation updates
- __build__ for build system changes (gradle updates, external dependency updates)
- __ci__ for CI configuration file changes e.g. updating a pipeline
- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file

Adding an exclamation mark after the commit type (`feat!`) or footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version.
25 changes: 25 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET</RepositoryUrl>
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/microsoft/OpenAPI.NET.OData/releases</PackageReleaseNotes>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>Microsoft OpenApi OData EDM</PackageTags>
<Version>1.7.4</Version>
</PropertyGroup>
<!-- https://github.com/clairernovotny/DeterministicBuilds#deterministic-builds -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Condition="!$(MSBuildProjectName.EndsWith('Tests'))" Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
</Project>
30 changes: 30 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"bootstrap-sha": "f69fea0e056e6de5a76b128e31ab580ec13356fa",
"exclude-paths": [
".azure-pipelines",
".github",
".idea",
".vs",
".vscode"
],
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"include-component-in-tag": false,
"include-v-in-tag": true,
"draft": false,
"packages": {
".": {
"package-name": "Microsoft.OpenApi.OData",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "xml",
"path": "Directory.Build.props",
"xpath": "//Project/PropertyGroup/Version"
}
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,12 @@
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
<LangVersion>Latest</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET.OData</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Title>Microsoft Open API OData Reader</Title>
<RootNamespace>Microsoft.OpenApi.OData</RootNamespace>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageId>Microsoft.OpenApi.OData</PackageId>
<SignAssembly>true</SignAssembly>
<Version>1.7.4</Version>
<Description>This package contains the codes you need to convert OData CSDL to Open API Document of Model.</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>Microsoft OpenApi OData EDM</PackageTags>
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET.OData</RepositoryUrl>
<PackageReleaseNotes>
- Sync changes from https://github.com/microsoft/OpenAPI.NET.OData/pull/567 to V1 of the library
</PackageReleaseNotes>
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\tool\Microsoft.OpenApi.OData.snk</AssemblyOriginatorKeyFile>
<OutputPath Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">..\..\bin\Debug\</OutputPath>
Expand All @@ -43,15 +30,10 @@
</PackageReference>
<PackageReference Include="Microsoft.OData.Edm" Version="7.21.6" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.23" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
<Compile Update="Properties\SRResource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
Expand Down

0 comments on commit 073ecc0

Please sign in to comment.