Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds release please configuration #1605

Merged
merged 9 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
primaryBranch: main
handleGHRelease: true
manifest: true
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
.\scripts\ValidatePackageContents.ps1 -ArtifactId microsoft-kiota-bundle -Version $env:PACKAGE_VERSION

release-maven-central:
if: contains(github.ref, 'refs/tags/v')
if: ${{ contains(github.ref, 'refs/tags/v') && github.actor == 'release-please[bot]' }}
runs-on: ubuntu-latest
environment: maven_central
needs: validate-package-contents
Expand Down Expand Up @@ -191,15 +191,11 @@ jobs:
cache: gradle
- name: Build with Gradle
run: ./gradlew --no-daemon build
- name: Release
uses: anton-yurchenko/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "true"
- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
args: |
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
files: |
components/**/build/libs/*.jar
components/**/**/build/libs/*.jar
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.5.0"
}
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.5.0] - 2024-09-30

### Added
Expand Down
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to Kiota Java

Kiota Java is a mono-repo containing source code for the following packages:

- 'com.microsoft.kiota:microsoft-kiota-abstractions'
- 'com.microsoft.kiota:microsoft-kiota-http-okHttp'
- 'com.microsoft.kiota:microsoft-kiota-authentication-azure'
- 'com.microsoft.kiota:microsoft-kiota-bundle'
- 'com.microsoft.kiota:microsoft-kiota-serialization-multipart'
- 'com.microsoft.kiota:microsoft-kiota-serialization-text'
- 'com.microsoft.kiota:microsoft-kiota-serialization-json'
- 'com.microsoft.kiota:microsoft-kiota-serialization-form'

Kiota Java 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 a an exclamation mark after the commit type (`feat!`) or footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,29 @@ Read more about Kiota [here](https://github.com/microsoft/kiota/blob/main/README
In `build.gradle` in the `dependencies` section:

```Groovy
// x-release-please-start-version
calebkiage marked this conversation as resolved.
Show resolved Hide resolved
implementation 'com.microsoft.kiota:microsoft-kiota-abstractions:1.5.0'
// x-release-please-end
implementation 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:1.5.0'
// x-release-please-end
// x-release-please-start-version
implementation 'com.microsoft.kiota:microsoft-kiota-bundle:1.5.0'
// x-release-please-end
implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1'
```

Expand All @@ -40,37 +55,51 @@ In `pom.xml` in the `dependencies` section:
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-abstractions</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-authentication-azure</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-http-okHttp</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-json</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-text</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-form</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-multipart</artifactId>
<!--x-release-please-start-version-->
<version>1.5.0</version>
<!--x-release-please-end-->
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public UserAgentHandlerOption() {}

private boolean enabled = true;
@Nonnull private String productName = "kiota-java";
// x-release-please-start-version
@Nonnull private String productVersion = "1.5.0";
// x-release-please-end

/**
* Gets the product name to be used in the user agent header
Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ org.gradle.parallel=true
org.gradle.caching=true

mavenGroupId = com.microsoft.kiota
# x-release-please-start-major
mavenMajorVersion = 1
# x-release-please-end
# x-release-please-start-minor
mavenMinorVersion = 5
# x-release-please-end
# x-release-please-start-patch
mavenPatchVersion = 0
# x-release-please-end
mavenArtifactSuffix =

#enable mavenCentralPublishingEnabled to publish to maven central
Expand Down
26 changes: 26 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"bootstrap-sha": "b82a08523d0bb5d9e27f87f10924296ca745f236",
"exclude-paths": [
".git",
".devcontainer",
".github",
".gradle",
".vscode",
"scripts",
"gradle"
],
"release-type": "simple",
"include-component-in-tag": false,
"include-v-in-tag": true,
"packages": {
".": {
calebkiage marked this conversation as resolved.
Show resolved Hide resolved
"changelog-path": "CHANGELOG.md",
"extra-files": [
"gradle.properties",
"README.md",
"components/http/okHttp/src/main/java/com/microsoft/kiota/http/middleware/options/UserAgentHandlerOption.java"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Loading