diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000000..9d1d1d9c7b1 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +manifest: true +primaryBranch: main +handleGHRelease: true diff --git a/.github/workflows/git-release.yml b/.github/workflows/git-release.yml deleted file mode 100644 index 31416d49920..00000000000 --- a/.github/workflows/git-release.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Git Release - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - -permissions: - contents: write - -jobs: - Git_Release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Github Release - uses: anton-yurchenko/git-release@v6.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} - DRAFT_RELEASE: "false" - PRE_RELEASE: "false" - CHANGELOG_FILE: "CHANGELOG.md" - ALLOW_EMPTY_CHANGELOG: "true" diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000000..e9945133a45 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,4 @@ +{ + ".": "0.104.0" +} + diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2db9edb57..51faa546773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,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] - -### Added - -### Changed - ## [0.104.0]- 2024-05-22 ### Changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 292d2ac986d..b6aad0010c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,3 +19,34 @@ Revisions of this nature will result in a 0.0.X change of the version number. If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. Revisions of this nature will result in a 0.X.X change of the version number. + +## 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. + +``` +[optional scope]: + + + + +``` + +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 footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/graph_request_adapter.go b/graph_request_adapter.go index 43105d49356..ede64a6d9b4 100644 --- a/graph_request_adapter.go +++ b/graph_request_adapter.go @@ -9,8 +9,11 @@ import ( ) var clientOptions = core.GraphClientOptions{ - GraphServiceVersion: "beta", + GraphServiceVersion: "beta", + /** The SDK version */ + // x-release-please-start-version GraphServiceLibraryVersion: "0.104.0", + // x-release-please-end } // GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware. @@ -72,23 +75,3 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndH return result, nil } - - - - - - - - - - - - - - - - - - - - diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000000..0f91fb5c56c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,17 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "packages": { + ".": { + "package-name": "github.com/microsoftgraph/msgraph-beta-sdk-go", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + "graph_request_adapter.go" + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } + \ No newline at end of file diff --git a/scripts/incrementMinorVersion.ps1 b/scripts/incrementMinorVersion.ps1 deleted file mode 100644 index b5dec44eb84..00000000000 --- a/scripts/incrementMinorVersion.ps1 +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -<# -.Synopsis - Increment the minor version string in the gradle.properties if the major, - minor, or patch version hasn't been manually updated. -.Description - Assumptions: - This script assumes it is run from the repo root. - Minor version is typically auto-incremented. - -#> - -function Update-TelemetryVersion([string]$telemetryFilePath, [version]$version) { - $telemetryFileContent = Get-Content -Path $telemetryFilePath -Raw - $telemetryFileContent = $telemetryFileContent -replace "\d{1,}\.\d{1,}\.\d{1,}", $version.ToString() - Set-Content -Path $telemetryFilePath $telemetryFileContent -} - -function Get-CurrentTelemetryVersion([string]$telemetryFilePath) { - $telemetryFileContent = Get-Content -Path $telemetryFilePath -Raw - if($telemetryFileContent -match "(\d{1,}\.\d{1,}\.\d{1,})") { - return [version]::Parse($Matches[1]) - } else { - Write-Error "Invalid version number format" - return $null; - } -} - -function Update-MinorVersionNumber([version]$currentVersion) { - return [version]::new($currentVersion.Major, $currentVersion.Minor + 1, 0); -} - -function Update-MinorVersion() { - $telemetryFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../graph_request_adapter.go" - $currentVersion = Get-CurrentTelemetryVersion -telemetryFilePath $telemetryFilePath - $nextVersion = Update-MinorVersionNumber -currentVersion $currentVersion - Update-TelemetryVersion -version $nextVersion -telemetryFilePath $telemetryFilePath -} -Update-MinorVersion \ No newline at end of file