File tree Expand file tree Collapse file tree 3 files changed +117
-0
lines changed Expand file tree Collapse file tree 3 files changed +117
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (C) 2025 Siemens
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ name : Lint Python Code
6+
7+ on :
8+ pull_request :
9+ branches :
10+ - master
11+ push :
12+
13+ jobs :
14+ format :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.x"
23+
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install black
28+ - name : Check code formatting with black
29+ run : |
30+ black --check --diff $(git ls-files '*.py')
Original file line number Diff line number Diff line change 1+ # Copyright (C) 2025 Siemens
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ name : Deploy
6+
7+ on :
8+ release :
9+ types : [published]
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+ release-build :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.x"
24+
25+ - name : Build release distributions
26+ run : |
27+ python -m pip install build
28+ python -m build
29+
30+ - name : Upload distributions
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : release-dists
34+ path : dist/
35+
36+ pypi-publish :
37+ runs-on : ubuntu-latest
38+ needs :
39+ - release-build
40+ permissions :
41+ id-token : write
42+
43+ environment :
44+ name : pypi
45+ url : https://pypi.org/project/debsbom/${{ github.event.release.name }}
46+
47+ steps :
48+ - name : Retrieve release distributions
49+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
50+ with :
51+ name : release-dists
52+ path : dist/
53+
54+ - name : Publish release distributions to PyPI
55+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
56+ with :
57+ packages-dir : dist/
Original file line number Diff line number Diff line change 1+ # Copyright (C) 2025 Siemens
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ name : Run Tests
6+
7+ on :
8+ pull_request :
9+ branches :
10+ - master
11+ push :
12+
13+ jobs :
14+ test :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.x"
23+
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install .[dev]
28+
29+ - name : Run pytest
30+ run : pytest
You can’t perform that action at this time.
0 commit comments