Skip to content

Commit

Permalink
Improve GitHub Actions & Upload to App Store Connect Metadata In The …
Browse files Browse the repository at this point in the history
…Repo (#74)

# Improve GitHub Actions & Upload to App Store Connect Metadata In The
Repo

## ⚙️ Release Notes 
- Improve GitHub Actions 
- Upload to App Store Connect Metadata In The Repo

### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored Aug 10, 2024
1 parent 2788a26 commit ee793c6
Show file tree
Hide file tree
Showing 35 changed files with 210 additions and 286 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/beta-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX-License-Identifier: MIT
#

name: Beta Deployment
name: Deployment

on:
push:
Expand Down Expand Up @@ -34,27 +34,38 @@ on:
default: staging

concurrency:
group: main
group: deployment
cancel-in-progress: false

jobs:
determineenvironment:
name: Determine Environment
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set-env.outputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine environment
- name: Determine Environment
id: set-env
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "::set-output name=environment::${{ inputs.environment }}"
echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then
echo "::set-output name=environment::${{ inputs.environment }}"
echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT
else
echo "::set-output name=environment::staging"
echo "environment=staging" >> $GITHUB_OUTPUT
fi
vars:
name: Inject Environment Variables In Deployment Workflow
needs: determineenvironment
runs-on: ubuntu-latest
environment: ${{ needs.determineenvironment.outputs.environment }}
outputs:
FIREBASE_PROJECT_ID: ${{ vars.FIREBASE_PROJECT_ID }}
steps:
- run: |
echo "Injecting Environment Variables In Deployment Workflow: ${{ vars.FIREBASE_PROJECT_ID }}"
buildandtest:
name: Build and Test
needs: determineenvironment
Expand All @@ -66,7 +77,7 @@ jobs:
secrets: inherit
iosapptestflightdeployment:
name: iOS App TestFlight Deployment
needs: [determineenvironment, buildandtest]
needs: [determineenvironment, vars, buildandtest]
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
permissions:
contents: read
Expand All @@ -75,16 +86,10 @@ jobs:
environment: ${{ needs.determineenvironment.outputs.environment }}
googleserviceinfoplistpath: 'PAWS/Supporting Files/GoogleService-Info.plist'
setupsigning: true
fastlanelane: beta
setupfirebaseemulator: true
firebaseemulatorimport: ./firebase --project ${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}
fastlanelane: deploy environment:"${{ needs.determineenvironment.outputs.environment }}"
secrets: inherit
vars:
name: Inject Environment Variables In Deployment Workflow
runs-on: ubuntu-latest
environment: ${{ needs.determineenvironment.outputs.environment }}
outputs:
FIREBASE_PROJECT_ID: ${{ vars.FIREBASE_PROJECT_ID }}
steps:
- run: echo "Injecting Environment Variables In Deployment Workflow ..."
deployfirebase:
name: Deploy Firebase Project
needs: [determineenvironment, vars, iosapptestflightdeployment]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
codeql: true
fastlanelane: codeql
fastlanelane: build
permissions:
security-events: write
actions: read
Expand Down Expand Up @@ -147,4 +147,3 @@ jobs:
with:
name: ECGReviewer_ColabBasic.pdf
path: ECGReviewer_ColabBasic.pdf

5 changes: 5 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ Files: PAWS/Resources/Assets.xcassets/*
Copyright: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
License: MIT
Comment: All files are part of the Stanford Spezi Data Pipeline Template open source project.

Files: fastlane/metadata/*
Copyright: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
License: MIT
Comment: All files are part of the Stanford Spezi Data Pipeline Template open source project.
182 changes: 13 additions & 169 deletions PAWS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@
buildRules = (
);
dependencies = (
2FCC1DD02B6A2CF000C686BE /* PBXTargetDependency */,
566155222AB83CF200209B80 /* PBXTargetDependency */,
2FDF443B2C65DB4A0075AFC1 /* PBXTargetDependency */,
2FDF443D2C65DB4A0075AFC1 /* PBXTargetDependency */,
);
name = PAWS;
packageProductDependencies = (
Expand Down Expand Up @@ -498,7 +498,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1340;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1600;
TargetAttributes = {
653A254C283387FE005D4D48 = {
CreatedOnToolsVersion = 13.4;
Expand Down Expand Up @@ -651,13 +651,13 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
2FCC1DD02B6A2CF000C686BE /* PBXTargetDependency */ = {
2FDF443B2C65DB4A0075AFC1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = 2FCC1DCF2B6A2CF000C686BE /* SwiftLintPlugin */;
productRef = 2FDF443A2C65DB4A0075AFC1 /* SwiftPackageListJSONPlugin */;
};
566155222AB83CF200209B80 /* PBXTargetDependency */ = {
2FDF443D2C65DB4A0075AFC1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = 566155212AB83CF200209B80 /* SwiftPackageListJSONPlugin */;
productRef = 2FDF443C2C65DB4A0075AFC1 /* SwiftLintPlugin */;
};
653A255F28338800005D4D48 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
Expand All @@ -672,154 +672,6 @@
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
2FEE10302998C89C000822E1 /* Test */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = TEST;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Test;
};
2FEE10312998C89C000822E1 /* Test */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "PAWS/Supporting Files/PAWS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "PAWS/Supporting Files/Info.plist";
INFOPLIST_KEY_NSCameraUsageDescription = "This message should never appear. Please adjust this when you start using camera information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_NSHealthShareUsageDescription = "The PAWS uses the step count to demonstrate Spezi's integration with HealthKit.";
INFOPLIST_KEY_NSHealthUpdateUsageDescription = "The PAWS uses the step count to demonstrate Spezi's integration with HealthKit.";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "This message should never appear. Please adjust this when you start using location information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "This message should never appear. Please adjust this when you start using location information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "This message should never appear. Please adjust this when you start using microphone information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_NSMotionUsageDescription = "This message should never appear. Please adjust this when you start using motion information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "This message should never appear. Please adjust this when you start using speecg information. We have to put this in here as ResearchKit has the possibility to use it and not putting it here returns an error on AppStore Connect.";
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIPAWSlicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIPAWSlicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.cs342.2023.paws;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
"SWIFT_ELicenseRef-PAWS_LOC_STRINGS" = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Test;
};
2FEE10322998C89C000822E1 /* Test */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 637867499T;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.cs342.2023.paws.tests;
PRODUCT_NAME = "$(TARGET_NAME)";
"SWIFT_ELicenseRef-PAWS_LOC_STRINGS" = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PAWS.app/PAWS";
};
name = Test;
};
2FEE10332998C89C000822E1 /* Test */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 637867499T;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.cs342.2023.pawsuitests;
PRODUCT_NAME = "$(TARGET_NAME)";
"SWIFT_ELicenseRef-PAWS_LOC_STRINGS" = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = PAWS;
};
name = Test;
};
653A256F28338800005D4D48 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -1038,7 +890,6 @@
653A257528338800005D4D48 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -1058,7 +909,6 @@
653A257628338800005D4D48 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -1078,7 +928,6 @@
653A257828338800005D4D48 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 637867499T;
Expand All @@ -1097,7 +946,6 @@
653A257928338800005D4D48 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 637867499T;
Expand All @@ -1120,7 +968,6 @@
isa = XCConfigurationList;
buildConfigurations = (
653A256F28338800005D4D48 /* Debug */,
2FEE10302998C89C000822E1 /* Test */,
653A257028338800005D4D48 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1130,7 +977,6 @@
isa = XCConfigurationList;
buildConfigurations = (
653A257228338800005D4D48 /* Debug */,
2FEE10312998C89C000822E1 /* Test */,
653A257328338800005D4D48 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1140,7 +986,6 @@
isa = XCConfigurationList;
buildConfigurations = (
653A257528338800005D4D48 /* Debug */,
2FEE10322998C89C000822E1 /* Test */,
653A257628338800005D4D48 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1150,7 +995,6 @@
isa = XCConfigurationList;
buildConfigurations = (
653A257828338800005D4D48 /* Debug */,
2FEE10332998C89C000822E1 /* Test */,
653A257928338800005D4D48 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand Down Expand Up @@ -1316,7 +1160,12 @@
isa = XCSwiftPackageProductDependency;
productName = SpeziScheduler;
};
2FCC1DCF2B6A2CF000C686BE /* SwiftLintPlugin */ = {
2FDF443A2C65DB4A0075AFC1 /* SwiftPackageListJSONPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 5661551B2AB8384200209B80 /* XCRemoteSwiftPackageReference "swift-package-list" */;
productName = "plugin:SwiftPackageListJSONPlugin";
};
2FDF443C2C65DB4A0075AFC1 /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 2FCC1DCE2B6A2CE000C686BE /* XCRemoteSwiftPackageReference "SwiftLint" */;
productName = "plugin:SwiftLintPlugin";
Expand Down Expand Up @@ -1386,11 +1235,6 @@
package = 5661551B2AB8384200209B80 /* XCRemoteSwiftPackageReference "swift-package-list" */;
productName = SwiftPackageList;
};
566155212AB83CF200209B80 /* SwiftPackageListJSONPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 5661551B2AB8384200209B80 /* XCRemoteSwiftPackageReference "swift-package-list" */;
productName = "plugin:SwiftPackageListJSONPlugin";
};
9739A0C52AD7B5730084BEA5 /* FirebaseStorage */ = {
isa = XCSwiftPackageProductDependency;
package = 2FE5DC9029EDD9C3004B9AB4 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
Expand Down
Loading

0 comments on commit ee793c6

Please sign in to comment.