-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (80 loc) · 2.08 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build (master)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: false
- name: Install General Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install --no-install-recommends python3-dev graphviz
- name: Install Python Dependencies
shell: bash
run: |
pip3 install wheel
pip3 install pylint yapf
- name: Run YAPF
shell: bash
run: |
yapf --verbose --diff --recursive src
- name: Run Pylint
shell: bash
run: |
pylint src
- name: Run Pyreverse
shell: bash
run: |
pyreverse --output pdf --verbose --colorize --filter OTHER src
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build
retention-days: 1
if-no-files-found: error
overwrite: true
path: |
classes.pdf
packages.pdf
release:
name: Release
runs-on: ubuntu-latest
needs: lint
if: ${{ github.ref == 'refs/heads/master' }}
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build
path: .
- name: Detect Version
id: version
shell: bash
run: |
echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: |
v${{ steps.version.outputs.version }}
automatic_release_tag: v${{ steps.version.outputs.version }}
prerelease: false
files: |
classes.pdf