Skip to content

Commit 5535edc

Browse files
committed
ci: Switch to knope-bot for releases
1 parent b488371 commit 5535edc

File tree

4 files changed

+4
-96
lines changed

4 files changed

+4
-96
lines changed

.github/workflows/preview_release_pr.yml

-24
This file was deleted.

.github/workflows/release-dry-run.yml

-17
This file was deleted.

.github/workflows/release.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,15 @@ on:
77

88
jobs:
99
release:
10-
if: github.head_ref == 'release' && github.event.pull_request.merged == true
10+
if: github.head_ref == 'knope/release' && github.event.pull_request.merged == true
1111
runs-on: ubuntu-latest
1212
permissions:
1313
id-token: write
1414
steps:
1515
- uses: actions/[email protected]
16-
with:
17-
fetch-depth: 0
18-
token: ${{ secrets.PAT }}
19-
- name: Install Knope
20-
uses: knope-dev/[email protected]
21-
with:
22-
version: 0.18.0
2316
- name: Install Hatchling
2417
run: pip install --upgrade hatchling
2518
- name: Build
2619
run: hatchling build
2720
- name: Push to PyPI
2821
uses: pypa/[email protected]
29-
- name: Create GitHub Release
30-
run: knope release
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.PAT }}

knope.toml

+3-43
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,9 @@
22
versioned_files = ["pyproject.toml"]
33
changelog = "CHANGELOG.md"
44

5-
[[workflows]]
6-
name = "prepare-release"
7-
8-
[[workflows.steps]]
9-
type = "Command"
10-
shell = true
11-
command = "git switch -c release"
12-
13-
[[workflows.steps]]
14-
type = "PrepareRelease"
15-
16-
[[workflows.steps]]
17-
type = "Command"
18-
shell = true
19-
command = "git commit -m \"chore: prepare release $version\" && git push --force --set-upstream origin release"
20-
21-
[workflows.steps.variables]
22-
"$version" = "Version"
23-
24-
[[workflows.steps]]
25-
type = "CreatePullRequest"
26-
base = "main"
27-
28-
[workflows.steps.title]
29-
template = "chore: prepare release $version"
30-
variables = { "$version" = "Version" }
31-
32-
[workflows.steps.body]
33-
template = "This PR was created by Knope. Merging it will create a new release\n\n$changelog"
34-
variables = { "$changelog" = "ChangelogEntry" }
35-
36-
[[workflows]]
37-
name = "release"
38-
39-
[[workflows.steps]]
40-
type = "Release"
41-
42-
[[workflows]]
43-
name = "document-change"
44-
45-
[[workflows.steps]]
46-
type = "CreateChangeFile"
47-
485
[github]
496
owner = "openapi-generators"
507
repo = "openapi-python-client"
8+
9+
[bot.releases]
10+
enabled = true

0 commit comments

Comments
 (0)