Skip to content

Commit 5c8c6f3

Browse files
committed
ci: integrate google release-please for automated releases
- Add release-please-config.json with Python/Poetry configuration - Bootstrap .release-please-manifest.json at version 1.7.14 - Add release-please.yml workflow triggered on main branch push - Update python-publish.yaml to trigger on semantic version tags - Configures pyproject.toml version bumping via TOML jsonpath
1 parent 91b364a commit 5c8c6f3

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

.github/workflows/python-publish.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Python Publish
22

33
on:
4-
release:
5-
types: [created]
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
67

78
permissions:
89
contents: read
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_created: ${{ steps.release.outputs.release_created }}
17+
tag_name: ${{ steps.release.outputs.tag_name }}
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
id: release
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
config-file: release-please-config.json
24+
manifest-file: .release-please-manifest.json

.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.14"
3+
}

release-please-config.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"bootstrap-sha": "9ad71ffd7cdb956850a292073a3492669231936c",
4+
"release-type": "python",
5+
"packages": {
6+
".": {
7+
"package-name": "descope",
8+
"changelog-path": "CHANGELOG.md",
9+
"extra-files": [
10+
{
11+
"type": "toml",
12+
"path": "pyproject.toml",
13+
"jsonpath": "$.tool.poetry.version"
14+
}
15+
]
16+
}
17+
},
18+
"include-v-in-tag": false,
19+
"bump-minor-pre-major": true,
20+
"bump-patch-for-minor-pre-major": true,
21+
"sequential-calls": false,
22+
"pull-request-title-pattern": "chore: release ${version}",
23+
"changelog-sections": [
24+
{ "type": "feat", "section": "Features" },
25+
{ "type": "fix", "section": "Bug Fixes" },
26+
{ "type": "perf", "section": "Performance Improvements" },
27+
{ "type": "revert", "section": "Reverts" },
28+
{ "type": "docs", "section": "Documentation" },
29+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": true },
30+
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
31+
{ "type": "test", "section": "Tests", "hidden": true },
32+
{ "type": "build", "section": "Build System", "hidden": true },
33+
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
34+
]
35+
}

0 commit comments

Comments
 (0)