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

Add release pleae configuration #439

Merged
merged 10 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 @@
manifest: true
primaryBranch: main
handleGHRelease: true
26 changes: 0 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,7 @@ permissions:
contents: write

jobs:
version:
name: Update version
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install poetry
run: |
pip install --upgrade poetry
- name: Update version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
poetry version $VERSION
- name: Commit changes
run: |
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
git config --local user.name "${{ secrets.GIT_USER_NAME }}"
git commit -am "chore: Update version"
git push origin ${{ github.ref }}

build:
needs: [version]
uses: ./.github/workflows/build.yml

publish:
Expand Down
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"
}
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +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).

## [1.5.0] - 2024-05-23

### Changed
Expand Down
34 changes: 33 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,36 @@ 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.
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.

```
<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 footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.
3 changes: 3 additions & 0 deletions msgraph_beta/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# The SDK version
# x-release-please-start-version
VERSION: str = '1.5.0'
# x-release-please-end
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ build-backend = "setuptools.build_meta"

[project]
name = "msgraph-beta-sdk"
# The SDK version
# x-release-please-start-version
version = "1.5.0"
# x-release-please-end
authors = [{name = "Microsoft", email = "[email protected]"}]
description = "The Microsoft Graph Beta Python SDK"
dependencies = [
Expand Down
23 changes: 23 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"bootstrap-sha": "9096adb098e11bd5484335b5e08bd0c882db7407",
"exclude-paths": [
".git",
".idea",
".github",
".vscode"
],
"release-type": "python",
"include-component-in-tag": false,
"include-v-in-tag": true,
"packages": {
".": {
"package-name": "msgraph_beta",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"pyproject.toml",
"msgraph_beta/_version.py"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
11 changes: 0 additions & 11 deletions scripts/incrementMinorVersion.ps1

This file was deleted.

Loading