Skip to content

Commit

Permalink
chore: setup cd pipelines (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
markgravity committed May 24, 2021
1 parent 57ba141 commit 464baf0
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 62 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This is a lint and test workflow for Flutter CI

name: Relase (staging)

# on:
# push:
# branches:
# - develop
# pull_request:
# branches:
# - develop
on:
pull_request:
jobs:
build_ios:
name: Build iOS
runs-on: macOS-latest
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/[email protected]
- uses: actions/setup-java@v1
with:
java-version: '12.x'

# Setup the Flutter environment.
- uses: subosito/flutter-action@v1
with:
channel: 'stable' # 'dev', 'alpha', default to: 'stable'
# flutter-version: '1.12.x' # uncomment this to specify the exact version of Flutter

- name: Get Flutter dependencies.
run: flutter pub get

- name: Build app
run: flutter build ios --flavor staging -t lib/main-staging.dart --no-codesign

- name: "Import Certificate: Development"
uses: devbotsxyz/xcode-import-certificate@master
with:
certificate-data: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA }}
certificate-passphrase: ${{ secrets.DEVELOPMENT_CERTIFICATE_PASSPHRASE }}
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }

- name: "Archive"
uses: devbotsxyz/xcode-archive@master

- name: Upload iPA
uses: actions/upload-artifact@master
with:
name: ios-build
path: build/ios/iphoneos
deploy_ios:
name: Upload to Firebase App Distribution
needs: [build_ios]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download Artifact
uses: actions/[email protected]
with:
name: ios-build
- name: Upload IPA
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_IOS_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
file: Runner.ipa
debug: true
6 changes: 6 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 723E2E286422E7355D82CD8E /* Pods-Runner.debug-production.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Debug-production";
Expand All @@ -484,6 +485,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = A5EBA3F1CC940667DF79EE46 /* Pods-Runner.profile-production.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Profile-production";
Expand All @@ -492,6 +494,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BD4D2DD9EF09CB23F1BFE775 /* Pods-Runner.release-production.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Release-production";
Expand All @@ -500,6 +503,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 527D168B5B717A9D51E5BDE8 /* Pods-Runner.debug-staging.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Debug-staging";
Expand All @@ -508,6 +512,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = C2F4412A61D42AC96F3D7D8A /* Pods-Runner.profile-staging.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Profile-staging";
Expand All @@ -516,6 +521,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E2E32C4D4960E4DC124372C0 /* Pods-Runner.release-staging.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = FM5NT9MLCT;
PRODUCT_NAME = Runner;
};
name = "Release-staging";
Expand Down
8 changes: 2 additions & 6 deletions ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
Expand Down
43 changes: 28 additions & 15 deletions ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,28 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug-staging"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug-staging">
<AdditionalOptions>
</AdditionalOptions>
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -22,45 +36,44 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-staging"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug-staging"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-staging"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release-staging"
shouldUseLaunchSchemeArgsEnv = "YES">
<BuildableProductRunnable>
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug-staging">
Expand Down
82 changes: 41 additions & 41 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(BUNDLE_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>$(ASSET_PREFIX)LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(BUNDLE_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>$(ASSET_PREFIX)LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

0 comments on commit 464baf0

Please sign in to comment.