1- name : Swift CI
1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
25
3- on :
4- push :
5- branches : [ main ]
6- pull_request :
7- branches : [ main ]
6+ # GitHub recommends pinning actions to a commit SHA.
7+ # To get a newer version, you will need to update the SHA.
8+ # You can also reference a tag or branch, but the action may change without warning.
9+
10+ name : Swift
11+
12+ on : [push]
813
914jobs :
10- test :
11- runs-on : ${{ matrix.os }}
15+ build :
16+ name : Swift ${{ matrix.swift }} on ${{ matrix.os }}
1217 strategy :
1318 matrix :
1419 os : [ubuntu-latest, macos-latest]
15-
16- steps :
17- - uses : actions/checkout@v4
18-
19- - name : Setup Swift
20- uses : vapor/swiftly-action@v0.2
21- with :
22- toolchain : ' 6.1'
23-
24- - name : Cache Swift Package Manager
25- uses : actions/cache@v3
26- with :
27- path : .build
28- key : ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
29- restore-keys : |
30- ${{ runner.os }}-spm-
31-
32- - name : Build
33- run : swift build -v
34-
35- - name : Run tests
36- run : swift test -v
37-
38- - name : Build release
39- run : swift build -c release
40-
41- - name : Test Makefile targets
42- run : |
43- make help
44- make build
45- make clean
46-
47-
48- security :
49- runs-on : ubuntu-latest
50- steps :
51- - uses : actions/checkout@v4
52-
53- - name : Run security audit
54- run : |
55- # Check for known security vulnerabilities in dependencies
56- echo "Checking for security vulnerabilities..."
57- # This would typically use tools like swift-package-audit when available
58- echo "No security audit tools configured yet"
59-
60- release :
61- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
62- needs : [test]
63- runs-on : ubuntu-latest
20+ swift : ["6.1"]
21+ runs-on : ${{ matrix.os }}
6422 steps :
65- - uses : actions/checkout@v4
66-
67- - name : Setup Swift
68- uses : vapor/swiftly-action@v0.2
69- with :
70- toolchain : ' 6.1'
71-
72- - name : Build release artifacts
73- run : |
74- # Build for multiple platforms
75- swift build -c release
76-
77- # Create release directory
78- mkdir -p release
79-
80- # Copy binary and documentation
81- cp .build/release/SwiftDeveloperMCPServer release/
82- cp README.md release/
83- cp Makefile release/
84-
85- - name : Upload release artifacts
86- uses : actions/upload-artifact@v3
87- with :
88- name : swift-developer-mcp-server-${{ github.sha }}
89- path : release/
23+ - uses : vapor/swiftly-action@65540b95f51493d65f5e59e97dcef9629ddf11bf
24+ with :
25+ toolchain : ${{ matrix.swift }}
26+ - uses : actions/checkout@v4
27+ - name : Build
28+ run : swift build
29+ - name : Run tests
30+ run : swift test
0 commit comments