Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
markgravity committed Jan 22, 2024
1 parent e715a8a commit 56891e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test_add_device_profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Test Add device and regenerate profiles with fastlane match
### MATCH_PASSWORD

on:
pull_request:
workflow_dispatch:
inputs:
devices:
Expand All @@ -23,7 +24,7 @@ on:
jobs:
create_files:
name: Create certificates and profiles
runs-on: [self-hosted, macOS]
runs-on: macOS-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
Expand All @@ -42,8 +43,8 @@ jobs:
run: bundle exec fastlane addDevicesGenerateProfiles
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASS }}
DEVICES: ${{ inputs.devices }}
PLATFORM: ${{ inputs.platform }}
DEVICES: '{"Luka iPhone 6": "1234567890123456789012345678901234567890","Felix iPad Air 2": "abcdefghijklmnopqrstvuwxyzabcdefghijklmn"}'
PLATFORM: "ios"

- name: Clean up keychain
if: ${{ always() }}
Expand Down
4 changes: 4 additions & 0 deletions fastlane/Constants/Secret.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ enum Secret {
static let appStoreIssuerIdKey = EnvironmentParser.string(key: "ISSUER_ID")

static let bumpAppStoreBuildNumber = EnvironmentParser.bool(key: "BUMP_APP_STORE_BUILD_NUMBER")

static let devices = EnvironmentParser.string(key: "DEVICES")

static let platform = EnvironmentParser.string(key: "PLATFORM")
}
9 changes: 3 additions & 6 deletions fastlane/Fastfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,17 @@ class Fastfile: LaneFile {
Match.syncCodeSigning(type: .adHoc, environment: .staging, isForce: true)
}

func addDevicesGenerateProfiles(withOptions options:[String: String]?) {
func addDevicesGenerateProfilesLane() {
desc("Add device and regenerate profiles with match")

guard
let json = options?["devices"],
let devices = SocketResponse.convertToDictionary(text: json),
let platform = options?["devices_type"] else {
guard let devices = SocketResponse.convertToDictionary(text: Secret.devices) else {
return
}

registerDevices(
devices: .userDefined(devices),
teamId: .userDefined(Constant.appleStagingTeamId),
platform: platform
platform: Secret.platform
)

Match.syncCodeSigning(type: .development, environment: .staging, isForce: true)
Expand Down

0 comments on commit 56891e9

Please sign in to comment.