Skip to content
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

env:
SCHEME: DevLog
XCODE_VERSION: latest

permissions:
contents: read
Expand All @@ -22,7 +23,7 @@ jobs:
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: ${{ env.XCODE_VERSION }}

- name: Cache SwiftPM
uses: actions/cache@v4
Expand Down Expand Up @@ -230,4 +231,4 @@ jobs:
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body
});
});
25 changes: 14 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ on:
branches:
- main

env:
RUBY_VERSION: "3.2"
XCODE_VERSION: latest
APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }}
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_PATH: fastlane/AuthKey.p8
SPACESHIP_CONNECT_API_IN_HOUSE: "false"
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}

permissions:
contents: read

Expand All @@ -15,15 +27,6 @@ jobs:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'develop'
runs-on: macos-latest
timeout-minutes: 45
env:
APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }}
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_PATH: fastlane/AuthKey.p8
SPACESHIP_CONNECT_API_IN_HOUSE: "false"
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}

steps:
- name: Checkout merge commit
Expand All @@ -35,12 +38,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "3.2"
ruby-version: ${{ env.RUBY_VERSION }}

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: ${{ env.XCODE_VERSION }}

- name: Write App Store Connect API key
env:
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ on:
- develop
workflow_dispatch:

env:
RUBY_VERSION: "3.2"
XCODE_VERSION: latest
APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }}
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_PATH: fastlane/AuthKey.p8
SPACESHIP_CONNECT_API_IN_HOUSE: "false"
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}

permissions:
contents: read

jobs:
testflight:
runs-on: macos-latest
timeout-minutes: 45
env:
APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }}
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_PATH: fastlane/AuthKey.p8
SPACESHIP_CONNECT_API_IN_HOUSE: "false"
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}

steps:
- name: Checkout
Expand All @@ -31,12 +34,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "3.2"
ruby-version: ${{ env.RUBY_VERSION }}

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: ${{ env.XCODE_VERSION }}

- name: Write App Store Connect API key
env:
Expand Down
34 changes: 15 additions & 19 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require "shellwords"
XCODE_PROJ = "DevLog.xcodeproj"
APP_IDENTIFIER = "opfic.DevLog"
TARGET_NAME = "DevLog"

default_platform(:ios)

Expand All @@ -24,21 +26,21 @@ platform :ios do
api_key = asc_api_key

versionNumber = get_version_number(
xcodeproj: "DevLog.xcodeproj",
target: "DevLog"
xcodeproj: XCODE_PROJ,
target: TARGET_NAME
)

latestTestflightBuildNumber = latest_testflight_build_number(
api_key: api_key,
app_identifier: "opfic.DevLog",
latestTestflightBuildNumber = app_store_build_number(
live: false,
app_identifier: APP_IDENTIFIER,
version: versionNumber,
initial_build_number: 0
)

setup_ci if ENV["CI"]

increment_build_number(
xcodeproj: "DevLog.xcodeproj",
xcodeproj: XCODE_PROJ,
build_number: latestTestflightBuildNumber + 1
)

Expand All @@ -48,37 +50,31 @@ platform :ios do
readonly: ENV["CI"] == "true"
)

match(
api_key: api_key,
type: "development",
readonly: ENV["CI"] == "true"
)

match(
api_key: api_key,
type: "appstore",
readonly: ENV["CI"] == "true"
)

if ENV["CI"] == "true"
provisioningProfileSpecifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["opfic.DevLog"].to_s
UI.user_error!("Missing App Store provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty?
provisioningProfileSpecifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING][APP_IDENTIFIER].to_s
UI.user_error!("Missing App Store provisioning profile mapping for #{APP_IDENTIFIER}") if provisioningProfileSpecifier.empty?

update_code_signing_settings(
use_automatic_signing: false,
path: "DevLog.xcodeproj",
path: XCODE_PROJ,
sdk: "iphoneos*",
team_id: ENV["APP_STORE_TEAM_ID"],
targets: ["DevLog"],
targets: [TARGET_NAME],
build_configurations: ["Release"],
code_sign_identity: "Apple Distribution",
profile_name: provisioningProfileSpecifier
)
end

build_app(
project: "DevLog.xcodeproj",
scheme: "DevLog",
project: XCODE_PROJ,
scheme: TARGET_NAME,
export_method: "app-store",
xcargs: "-skipPackagePluginValidation"
)
Expand Down
Loading