Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action #9

Merged
merged 8 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on: [ push, pull_request, workflow_dispatch ]

permissions: read-all

env:
XCODE_PROJECT: "approf.xcodeproj"
XCODE_SCHEME: "approf"
CODE_SIGN_IDENTITY: "-"
BUILD_DIR: "build"
XCODE_ARCHIVE: "approf.xcarchive"
APP_NAME: "approf.app"
EXPORT_OPTIONS_PLIST: "exportOptions.plist"
DMG_NAME: "approf"
DMG_FILE_NAME: "approf.dmg"

jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Xcode
run: |
sudo xcode-select -s "/Applications/Xcode_16_beta_4.app"
xcodebuild -version
- name: Allow macro
run: |
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Build
run: xcodebuild -project "$XCODE_PROJECT" -scheme "$XCODE_SCHEME" archive CODE_SIGN_IDENTITY="$CODE_SIGN_IDENTITY" -archivePath "$BUILD_DIR/$XCODE_ARCHIVE"
- name: Export
run: |
plutil -convert xml1 - -o "$EXPORT_OPTIONS_PLIST" << EOF
{
"destination": "export",
"method": "mac-application"
}
EOF

xcodebuild -exportArchive -archivePath "$BUILD_DIR/$XCODE_ARCHIVE" -exportPath "$BUILD_DIR" -exportOptionsPlist "$EXPORT_OPTIONS_PLIST"
- name: Resign App
run: codesign --force --deep -s "$CODE_SIGN_IDENTITY" "$BUILD_DIR/$APP_NAME"
- name: Make DMG
run: hdiutil create -srcdir "$BUILD_DIR" -volname "$DMG_NAME" "$DMG_FILE_NAME"
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Build
path: ${{ env.DMG_FILE_NAME }}
7 changes: 6 additions & 1 deletion approf.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objectVersion = 70;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -212,6 +212,10 @@
EBFC00EE2C3D0AFE004A1B93 /* Delay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Delay.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
EB7D79402C65635200CCD4F3 /* .github */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = .github; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
EBEF3A1B2C3B255A0003477D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
Expand Down Expand Up @@ -460,6 +464,7 @@
EBEF3A152C3B255A0003477D = {
isa = PBXGroup;
children = (
EB7D79402C65635200CCD4F3 /* .github */,
EB9444292C42F6E50050F0D1 /* approf */,
EB94443A2C42F7050050F0D1 /* approfTests */,
EB94443E2C42F70E0050F0D1 /* approfUITests */,
Expand Down
102 changes: 0 additions & 102 deletions approf.xcodeproj/xcshareddata/xcschemes/pprof.xcscheme

This file was deleted.