-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (82 loc) · 2.56 KB
/
workflow.yml
File metadata and controls
101 lines (82 loc) · 2.56 KB
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
96
97
98
99
100
101
name: CI/CD Pipeline
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
env:
SRC_PYTHON_VERSION: "3.11"
TEST_PATH: "tests"
jobs:
setup-test:
name: Setup and Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
src-python-version: ${{ env.SRC_PYTHON_VERSION }}
uv-group: "pipeline"
uv-extra: "--all-extras"
- name: Run Tests
uses: ./.github/actions/test-code
with:
src-tests-folder: ${{ env.TEST_PATH }}
build-deploy-docs:
if: github.ref == 'refs/heads/main'
name: Build MkDocs Documentation
runs-on: ubuntu-latest
needs: setup-test
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
src-python-version: ${{ env.SRC_PYTHON_VERSION }}
uv-group: "documentation"
- name: Get Version
id: version
uses: ./.github/actions/obtain-version
- name: Build Documentation
uses: ./.github/actions/build-mkdocs
with:
docs-version: ${{ steps.version.outputs.version }}
create-release:
if: github.ref == 'refs/heads/main'
name: Create Release
runs-on: ubuntu-latest
needs: build-deploy-docs
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
src-python-version: ${{ env.SRC_PYTHON_VERSION }}
- name: Get Version
id: version
uses: ./.github/actions/obtain-version
- name: Create Release
id: release
uses: ./.github/actions/create-release
with:
version: ${{ steps.version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Release Summary
run: |
echo "# Release Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Version:** ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "- **Created:** ${{ steps.release.outputs.created }}" >> $GITHUB_STEP_SUMMARY