Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFq1 committed Sep 21, 2024
1 parent 06ef41f commit a89a3a2
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,46 +48,20 @@ jobs:
/usr/libexec/PlistBuddy -c 'Print gitCommit' ClashX/Info.plist
/usr/libexec/PlistBuddy -c 'Print buildTime' ClashX/Info.plist
- name: swiftui build infos
run: |
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $(git rev-list --count origin/master..origin/meta)" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $(git describe --tags --abbrev=0)" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c "Add coreVersion string $(ls clash.meta | grep -m1 "" | sed -ne 's/.*64-\(.*\).gz/\1/p')" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c "Add gitBranch string $GITHUB_REF_NAME" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c "Add gitCommit string ${GITHUB_SHA::7}" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c "Add buildTime string $(date +%Y-%m-%d\ %H:%M)" ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print coreVersion' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print gitBranch' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print gitCommit' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
/usr/libexec/PlistBuddy -c 'Print buildTime' ClashX/ClashX\ Meta\ SwiftUI-Info.plist
- name: install deps
run: |
bash install_dependency.sh
xcodebuild -resolvePackageDependencies -project ClashX.xcodeproj
- name: build
if: startsWith(github.ref, 'refs/tags/')
run: |
xcodebuild archive -project ClashX.xcodeproj -scheme ClashX\ Meta -archivePath archive/ClashX.xcarchive -showBuildTimingSummary -allowProvisioningUpdates
- name: build-SwiftUI
run: |
xcodebuild archive -project ClashX.xcodeproj -scheme ClashX\ Meta\ SwiftUI -archivePath archive/ClashX\ SwiftUI.xcarchive -showBuildTimingSummary -allowProvisioningUpdates
- name: create zip
if: startsWith(github.ref, 'refs/tags/')
run: ditto -c -k --sequesterRsrc --keepParent archive/ClashX.xcarchive/Products/Applications/ClashX\ Meta.app "ClashX Meta.zip"

- name: create SwiftUI zip
run: ditto -c -k --sequesterRsrc --keepParent archive/ClashX\ SwiftUI.xcarchive/Products/Applications/ClashX\ Meta.app "ClashX Meta macOS 12.0+.zip"


- name: upload Artifact
uses: actions/upload-artifact@v4
Expand All @@ -105,5 +79,4 @@ jobs:
generate_release_notes: true
files: |
ClashX Meta.zip
ClashX Meta macOS 12.0+.zip

0 comments on commit a89a3a2

Please sign in to comment.