Skip to content

Commit

Permalink
hi again
Browse files Browse the repository at this point in the history
  • Loading branch information
ogulcan keskin committed Mar 18, 2024
1 parent 4cb846c commit fed0af0
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 82 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions a tab
workflow_dispatch:

jobs:
deploy:
name: Deploying to Testflight
runs-on: macOS-latest

steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Deploy iOS Beta to TestFlight via Fastlane
uses: maierj/[email protected]
with:
lane: closed_beta
env:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}'
DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}'
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}'
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}'
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
34 changes: 0 additions & 34 deletions .github/workflows/pullRequest.yml

This file was deleted.

30 changes: 30 additions & 0 deletions Fastlane/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
MATCH_PASSWORD = "123456"
username = "ogulcankeskin93"
MATCH_GIT_BASIC_AUTHORIZATION = "Z2hwX2plTXFnUTZWUXlSTUJDbjR3RURKZUhOelZKSG1kSDMxdldJaw=="


APPLE_KEY_ID="Y59CN6MQY6"
APPLE_ISSUER_ID="ee796e73-a95d-4683-beb5-0d6594a0c176"
APPLE_KEY_CONTENT="-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxx
-----END PRIVATE KEY-----"
APP_STORE_CONNECT_TEAM_ID="124242512"
DEVELOPER_APP_ID="xxxxxxxxx"
DEVELOPER_APP_IDENTIFIER="com.deneyehayir.deneysiz"
DEVELOPER_PORTAL_TEAM_ID="B9YVSAL4BY"
FASTLANE_APPLE_ID="[email protected]"
MATCH_PASSWORD="123456"
PROVISIONING_PROFILE_SPECIFIER="xxxxxxxxxxxxxx"
TEMP_KEYCHAIN_PASSWORD="xxxxxxx"
TEMP_KEYCHAIN_USER="xxxxxxx"
GIT_AUTHORIZATION="xxxxxxxxxxxxx"


app_identifier("com.deneyehayir.deneysiz") # The bundle identifier of your app
apple_id("[email protected]") # Your Apple Developer Portal username

itc_team_id("124242512") # App Store Connect Team ID
team_id("B9YVSAL4BY") # Developer Portal Team ID

# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
12 changes: 4 additions & 8 deletions Fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
app_identifier("com.deneyehayir.deneysiz") # The bundle identifier of your app
apple_id("[email protected]") # Your Apple Developer Portal username

itc_team_id("124242512") # App Store Connect Team ID
team_id("B9YVSAL4BY") # Developer Portal Team ID

# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
app_identifier(ENV["DEVELOPER_APP_IDENTIFIER"])
apple_id(ENV["FASTLANE_APPLE_ID"])
itc_team_id(ENV["APP_STORE_CONNECT_TEAM_ID"])
team_id(ENV["DEVELOPER_PORTAL_TEAM_ID"])
114 changes: 74 additions & 40 deletions Fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,87 @@
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "300"
DEVELOPER_APP_ID = ENV["DEVELOPER_APP_ID"]
DEVELOPER_APP_IDENTIFIER = ENV["DEVELOPER_APP_IDENTIFIER"]
PROVISIONING_PROFILE_SPECIFIER = ENV["PROVISIONING_PROFILE_SPECIFIER"]
TEMP_KEYCHAIN_USER = ENV["TEMP_KEYCHAIN_USER"]
TEMP_KEYCHAIN_PASSWORD = ENV["TEMP_KEYCHAIN_PASSWORD"]
APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"]
APPLE_KEY_ID = ENV["APPLE_KEY_ID"]
APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"]
GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"]

def delete_temp_keychain(name)
delete_keychain(
name: name
) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db")
end

def create_temp_keychain(name, password)
create_keychain(
name: name,
password: password,
unlock: false,
timeout: 0
)
end

def ensure_temp_keychain(name, password)
delete_temp_keychain(name)
create_temp_keychain(name, password)
end

platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
lane :closed_beta do
keychain_name = TEMP_KEYCHAIN_USER
keychain_password = TEMP_KEYCHAIN_PASSWORD
ensure_temp_keychain(keychain_name, keychain_password)

api_key = app_store_connect_api_key(
key_id: APPLE_KEY_ID,
issuer_id: APPLE_ISSUER_ID,
key_content: APPLE_KEY_CONTENT,
duration: 1200,
in_house: false
)

increment_build_number(xcodeproj: "Deneysiz.xcodeproj")
build_app(scheme: "Deneysiz")
upload_to_testflight
end

cocoapods(
clean_install: true
)

desc 'Builds project and executes unit tests'
lane :unit_test do |options|
scan(
clean: options[:clean],
skip_package_dependencies_resolution: options[:skip_package_dependencies_resolution]
)
end
match(
type: 'appstore',
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
git_basic_authorization: Base64.strict_encode64(GIT_AUTHORIZATION),
readonly: true,
keychain_name: keychain_name,
keychain_password: keychain_password,
api_key: api_key
)

desc 'Running iOS tests using fastlane'
lane :tests do
run_tests(
gym(
configuration: "Release",
workspace: "Deneysiz.xcodeproj/project.xcworkspace",
scheme: "Deneysiz",
devices: ["iPhone 14"],
clean: true,
prelaunch_simulator: true,
result_bundle: true
export_method: "app-store",
export_options: {
provisioningProfiles: {
DEVELOPER_APP_ID => PROVISIONING_PROFILE_SPECIFIER
}
}
)

pilot(
apple_id: "#{DEVELOPER_APP_ID}",
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
skip_waiting_for_build_processing: true,
skip_submission: true,
distribute_external: false,
notify_external_testers: false,
ipa: "./Deneysiz.ipa"
)
end

lane :runTestFlight do
setup_ci if ENV['CI']
match(type: "appstore", readonly: true, git_basic_authorization: ENV["MATCH_GIT_BASIC_AUTHORIZATION"])
build_app(clean: true, scheme: "Deneysiz")
delete_temp_keychain(keychain_name)
end
end
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods"

0 comments on commit fed0af0

Please sign in to comment.