File tree Expand file tree Collapse file tree 6 files changed +81
-91
lines changed Expand file tree Collapse file tree 6 files changed +81
-91
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches : [main]
4
+ name : Create Release PR
5
+ jobs :
6
+ prepare-release :
7
+ if : " !contains(github.event.head_commit.message, 'chore: prepare release')" # Skip merges from releases
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ with :
12
+ fetch-depth : 0
13
+ token : ${{ secrets.PAT }}
14
+ - name : Configure Git
15
+ run : |
16
+ git config --global user.name GitHub Actions
17
+ git config user.email github-actions@github.com
18
+ - uses : knope-dev/action@v2.0.0
19
+ with :
20
+ version : 0.12.0
21
+ - run : knope prepare-release --verbose
22
+ env :
23
+ GITHUB_TOKEN : ${{ secrets.PAT }}
24
+ continue-on-error : true
Original file line number Diff line number Diff line change 1
1
name : Release Dry Run
2
2
3
3
on :
4
- push :
5
- branches :
6
- - main
7
4
pull_request :
8
5
jobs :
9
6
release :
Original file line number Diff line number Diff line change 1
1
name : Release
2
2
3
- on : workflow_dispatch
3
+ on :
4
+ pull_request :
5
+ types : [closed]
6
+ branches : [main]
4
7
5
8
jobs :
6
9
release :
10
+ if : github.head_ref == 'release' && github.event.pull_request.merged == true
7
11
runs-on : ubuntu-latest
8
12
steps :
9
13
- uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
10
14
with :
11
15
fetch-depth : 0
12
16
token : ${{ secrets.PAT }}
13
- - name : Import GPG key
14
- uses : crazy-max/ghaction-import-gpg@v6
15
- with :
16
- gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
17
- git_user_signingkey : true
18
- git_commit_gpgsign : true
19
- git_push_gpgsign : false
20
17
- name : Install Knope
21
18
uses : knope-dev/action@v2.0.0
22
19
with :
23
20
version : 0.12.0
24
- - name : Bump Version & Create GitHub Release
25
- run : knope release
26
- env :
27
- GITHUB_TOKEN : ${{ secrets.PAT }}
28
21
- name : Install Poetry
29
22
run : pip install --upgrade poetry
30
23
- name : Push to PyPI
31
24
run : poetry publish --build -u __token__ -p ${{ secrets.PYPI_TOKEN }}
25
+ - name : Create GitHub Release
26
+ run : knope release
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.PAT }}
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ versioned_files = [" pyproject.toml" ]
3
+ changelog = " CHANGELOG.md"
4
+
5
+ [[workflows ]]
6
+ name = " prepare-release"
7
+
8
+ [[workflows .steps ]]
9
+ type = " Command"
10
+ command = " git switch -c release"
11
+
12
+ [[workflows .steps ]]
13
+ type = " PrepareRelease"
14
+
15
+ [[workflows .steps ]]
16
+ type = " Command"
17
+ command = " git commit -m \" chore: prepare release $version\" && git push --force --set-upstream origin release"
18
+
19
+ [workflows .steps .variables ]
20
+ "$version" = " Version"
21
+
22
+ [[workflows .steps ]]
23
+ type = " CreatePullRequest"
24
+ base = " main"
25
+
26
+ [workflows .steps .title ]
27
+ template = " chore: prepare release $version"
28
+ variables = { "$version" = " Version" }
29
+
30
+ [workflows .steps .body ]
31
+ template = " This PR was created by Knope. Merging it will create a new release\n\n $changelog"
32
+ variables = { "$changelog" = " ChangelogEntry" }
33
+
34
+ [[workflows ]]
35
+ name = " release"
36
+
37
+ [[workflows .steps ]]
38
+ type = " Release"
39
+
40
+ [[workflows ]]
41
+ name = " document-change"
42
+
43
+ [[workflows .steps ]]
44
+ type = " CreateChangeFile"
45
+
46
+ [github ]
47
+ owner = " openapi-generators"
48
+ repo = " openapi-python-client"
You can’t perform that action at this time.
0 commit comments