55 tags :
66 - ' v*'
77
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.ref }}
10+ cancel-in-progress : true
11+
812jobs :
913 test :
1014 name : Test Release
1115 runs-on : macos-26
1216 steps :
1317 - name : Checkout code
1418 uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Cache Swift packages
23+ uses : actions/cache@v4
24+ with :
25+ path : .build
26+ key : spm-${{ runner.os }}-${{ hashFiles('Package.swift') }}
27+ restore-keys : |
28+ spm-${{ runner.os }}-
1529
1630 - name : Check Swift version
1731 run : swift --version
@@ -31,15 +45,31 @@ jobs:
3145 steps :
3246 - name : Checkout code
3347 uses : actions/checkout@v4
48+ with :
49+ fetch-depth : 0
3450
3551 - name : Get version from tag
3652 id : get_version
3753 run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
3854
3955 - name : Generate release notes
40- id : release_notes
4156 run : |
42- cat > release_notes.md << 'EOF'
57+ # Get previous tag for changelog
58+ PREV_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | sed -n '2p')
59+
60+ # Generate changelog
61+ echo "## What's Changed" > release_notes.md
62+ echo "" >> release_notes.md
63+ if [ -z "$PREV_TAG" ]; then
64+ git log --pretty=format:"- %s" HEAD >> release_notes.md
65+ else
66+ git log --pretty=format:"- %s" ${PREV_TAG}..HEAD >> release_notes.md
67+ fi
68+ echo "" >> release_notes.md
69+ echo "" >> release_notes.md
70+
71+ # Append static content
72+ cat >> release_notes.md << 'EOF'
4373 ## Installation
4474
4575 ### Swift Package Manager
@@ -58,40 +88,12 @@ jobs:
5888 .target(name: "YourTarget", dependencies: ["XCResultParser"])
5989 ```
6090
61- ## Features
62-
63- - 📦 Parse Xcode `.xcresult` bundles
64- - ⚠️ Extract build warnings, errors, and analyzer warnings
65- - 🧪 Extract test failures with source locations
66- - 🔄 Type-safe Swift models with resilient decoding
67- - ⚡ Async/await support with Swift concurrency
68- - 🛡️ Zero external dependencies
69-
7091 ## Requirements
7192
7293 - Swift 6.2+
7394 - macOS 15+
7495 - Xcode 16+
7596
76- ## Usage
77-
78- ```swift
79- import XCResultParser
80-
81- let parser = XCResultParser(path: "path/to/test.xcresult")
82- let result = try await parser.parse()
83-
84- // Access build issues
85- for issue in result.buildResults?.allIssues ?? [] {
86- print("\(issue.severity): \(issue.message)")
87- }
88-
89- // Access test failures
90- for failure in result.testResults?.failures ?? [] {
91- print("FAIL: \(failure.testClass).\(failure.testName)")
92- }
93- ```
94-
9597 For more information, see the [README](https://github.com/${{ github.repository }}/blob/main/README.md).
9698 EOF
9799
0 commit comments