File tree 3 files changed +100
-2
lines changed
3 files changed +100
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : ' 📜 Check Commit Messages'
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - opened
7
+ - edited
8
+ - reopened
9
+ - synchronize
10
+ branches :
11
+ - ' main'
12
+
13
+ jobs :
14
+ check-commit-messages :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : ' 📜 Check commit messages format'
18
+ uses : gsactions/commit-message-checker@v1
19
+ with :
20
+ pattern : ' ^[^!]+: [A-Za-z]+.+ .+\.$'
21
+ flags : ' gm'
22
+ error : ' Commit subject line must match the following pattern: <scope>: <description>.'
23
+ excludeTitle : ' false'
24
+ excludeDescription : ' true'
25
+ checkAllCommitMessages : ' true'
26
+ accessToken : ${{ secrets.GITHUB_TOKEN }}
27
+ - name : ' 📜 Check commit messages length'
28
+ uses : gsactions/commit-message-checker@v1
29
+ with :
30
+ pattern : ' ^[^#].{10,78}$'
31
+ error : ' Commit subject line maximum line length of 78 characters is exceeded.'
32
+ excludeTitle : ' false'
33
+ excludeDescription : ' true'
34
+ checkAllCommitMessages : ' true'
35
+ accessToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -19,16 +19,20 @@ jobs:
19
19
python-version : ["3.8", "3.9", "3.10"]
20
20
21
21
steps :
22
- - uses : actions/checkout@v3
23
- - name : Set up Python ${{ matrix.python-version }}
22
+ - name : ' ⏳ Checkout repository'
23
+ uses : actions/checkout@v3
24
+
25
+ - name : ' 🐍 Set up Python ${{ matrix.python-version }}'
24
26
uses : actions/setup-python@v3
25
27
with :
26
28
python-version : ${{ matrix.python-version }}
29
+
27
30
- name : ' 🛠 Install dependencies'
28
31
run : |
29
32
python -m pip install --upgrade pip
30
33
python -m pip install flake8 pytest
31
34
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
35
+
32
36
- name : ' 😾 Lint with flake8'
33
37
run : |
34
38
# stop the build if there are Python syntax errors or undefined names
Original file line number Diff line number Diff line change
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name : ' 📦 Python Package'
5
+
6
+ on :
7
+ push :
8
+ tags :
9
+ - ' v*.*.*'
10
+ branches :
11
+ - " !*"
12
+ paths :
13
+ - ' *.py'
14
+ - ' .github/workflows/*.yml'
15
+ - ' .github/workflows/*.json'
16
+ - ' !**/README.md'
17
+
18
+ permissions :
19
+ contents : read
20
+
21
+ jobs :
22
+ build :
23
+ runs-on : ubuntu-latest
24
+ permissions :
25
+ contents : write
26
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
27
+ steps :
28
+ - name : ' ⏳ Checkout repository'
29
+ uses : actions/checkout@v3
30
+
31
+ - name : ' 🐍 Set up Python 3'
32
+ uses : actions/setup-python@v3
33
+ with :
34
+ python-version : " 3.10"
35
+
36
+ - name : ' 🛠 Install dependencies'
37
+ run : |
38
+ python -m pip install --upgrade pip
39
+ python -m pip install build
40
+
41
+ - name : ' 📦 Build package'
42
+ run : python3 -m build
43
+
44
+ - name : " ✏️ Generate changelog"
45
+ id : changelog
46
+ uses : mikepenz/release-changelog-builder-action@v3
47
+ with :
48
+ toTag : ${{ github.sha }}
49
+ env :
50
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
+
52
+ - name : ' 🔥 Create release'
53
+ uses : softprops/action-gh-release@v1
54
+ with :
55
+ draft : false
56
+ files : dist/*
57
+ body : ${{steps.changelog.outputs.changelog}}
58
+ env :
59
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments