File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 7
7
steps :
8
8
- name : Check PR Title for Conventional Commit Format
9
9
run : |
10
- if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*'; then
10
+ if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|Release-As )(\(\w+\))?!?:\s.*'; then
11
11
echo 'The title does not conform to the Conventional Commit.'
12
12
echo 'Please refer to "https://www.conventionalcommits.org/"'
13
13
exit 1
Original file line number Diff line number Diff line change 6
6
permissions :
7
7
contents : read
8
8
jobs :
9
- release :
9
+ release_and_publish :
10
10
permissions :
11
11
contents : write
12
12
pull-requests : read
13
13
runs-on : ubuntu-latest
14
14
steps :
15
+ - name : Release please
16
+ id : release_please
17
+ uses : googleapis/release-please-action@v4
18
+ with :
19
+ # The current PAT (personal access token) was created on 2024-08-05,
20
+ # since the maximum validity of PAT is 1 year, you need to change the PAT before 2025-08-05.
21
+ token : ${{ secrets.PAT }}
22
+ release-type : simple
15
23
- uses : actions/checkout@v4
24
+ if : ${{ steps.release_please.outputs.release_created }}
16
25
with :
17
26
fetch-depth : 0
18
27
- name : Set up Python
28
+ if : ${{ steps.release_please.outputs.release_created }}
19
29
uses : actions/setup-python@v5
20
30
with :
21
31
cache : pip
22
32
python-version : ' 3.10'
23
33
- name : Install dependencies
34
+ if : ${{ steps.release_please.outputs.release_created }}
24
35
run : |
25
36
python -m pip install --upgrade pip
26
37
pip install setuptools wheel twine # better-exceptions(optional for debug)
27
- - name : Release please
28
- id : release_please
29
- uses : googleapis/release-please-action@v4
30
- with :
31
- # The current PAT (personal access token) was created on 2024-08-05,
32
- # since the maximum validity of PAT is 1 year, you need to change the PAT before 2025-08-05.
33
- token : ${{ secrets.PAT }}
34
- release-type : simple
35
38
- run : env | sort
39
+ if : ${{ steps.release_please.outputs.release_created }}
36
40
- run : make dev
41
+ if : ${{ steps.release_please.outputs.release_created }}
37
42
- run : make build
43
+ if : ${{ steps.release_please.outputs.release_created }}
38
44
- name : upload
39
- if : ${{ steps.release .outputs.release_created }}
45
+ if : ${{ steps.release_please .outputs.release_created }}
40
46
env :
41
47
TWINE_USERNAME : __token__
42
48
TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments