-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.43 KB
/
main.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
name: Main Branch CI
on:
push:
branches:
- main
jobs:
tests:
name: Unit-Tests
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode 16.0
run: sudo xcode-select -s /Applications/Xcode_16.0.app
- name: Setup Swift version
uses: swift-actions/setup-swift@v2
with:
swift-version: "6.0"
- name: Run unit tests
run: |
swift test --enable-code-coverage
update_documentation:
name: Update documentation
runs-on: macos-latest
needs: tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode 16.0
run: sudo xcode-select -s /Applications/Xcode_16.0.app
- name: Setup Swift version
uses: swift-actions/setup-swift@v2
with:
swift-version: "6.0"
- name: Generate documentation
uses: fwcd/swift-docc-action@v1
with:
target: SemanticVersioningKit
output: ./docs
hosting-base-path: SemanticVersioningKit
disable-indexing: "true"
transform-for-static-hosting: "true"
- name: Commit documentation
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add ./docs/**
git commit -m "chore(documentation): Generate documentation"
git push