File tree Expand file tree Collapse file tree 4 files changed +88
-0
lines changed
Expand file tree Collapse file tree 4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types : [published]
4+
5+ name : Build Release Artifacts
6+ jobs :
7+ build-macos :
8+ name : Build macOS Executable
9+ runs-on : macos-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v3
13+ - name : Build macOS binary
14+ run : scripts/build-universal-macos.sh
15+ - name : ' Upload macOS Build Artifact'
16+ uses : actions/upload-artifact@v4
17+ with :
18+ name : ProjectAnalyzer-macos
19+ path : builds/ProjectAnalyzer-macos
20+
21+ build-linux :
22+ name : Build Linux Executable
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v3
27+ - name : Build it
28+ run : scripts/build-linux.sh
29+ - name : ' Upload Linux Build Artifact'
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : ProjectAnalyzer-linux
33+ path : builds/ProjectAnalyzer-linux
34+
35+ upload :
36+ name : Upload release artifacts
37+ runs-on : ubuntu-latest
38+ needs : [build-macos, build-linux]
39+ steps :
40+ - uses : actions/download-artifact@v4
41+ with :
42+ path : .
43+ - name : List downloaded files
44+ run : ls -R
45+ - name : Release
46+ uses : softprops/action-gh-release@v2
47+ with :
48+ token : ${{ secrets.GITHUB_TOKEN }}
49+ tag_name : ${{ github.event.release.name }}
50+ files : ./*/*
51+ fail_on_unmatched_files : true
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ DerivedData/
66.swiftpm /configuration /registries.json
77.swiftpm /xcode /package.xcworkspace /contents.xcworkspacedata
88.netrc
9+ builds
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # 1
4+ set -e
5+
6+ # 2
7+ swift build -c release
8+ BUILD_PATH=$( swift build -c release --show-bin-path)
9+ echo -e " \n\nBuild at ${BUILD_PATH} "
10+
11+ # 3
12+ DESTINATION=" builds/ProjectAnalyzer-linux"
13+ if [ ! -d " builds" ]; then
14+ mkdir " builds"
15+ fi
16+
17+ cp " $BUILD_PATH /ProjectAnalyzer" " $DESTINATION "
18+ echo " Copied binary to $DESTINATION "
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # 1
4+ set -e
5+
6+ # 2
7+ swift build -c release --arch arm64 --arch x86_64
8+ BUILD_PATH=$( swift build -c release --arch arm64 --arch x86_64 --show-bin-path)
9+ echo -e " \n\nBuild at ${BUILD_PATH} "
10+
11+ # 3
12+ DESTINATION=" builds/ProjectAnalyzer-macos"
13+ if [ ! -d " builds" ]; then
14+ mkdir " builds"
15+ fi
16+
17+ cp " $BUILD_PATH /ProjectAnalyzer" " $DESTINATION "
18+ echo " Copied binary to $DESTINATION "
You can’t perform that action at this time.
0 commit comments