Skip to content

[#546] Support adding new devices directly from Github Action #5

[#546] Support adding new devices directly from Github Action

[#546] Support adding new devices directly from Github Action #5

name: Test Add device and regenerate profiles with fastlane match
# SECRETS needed:
### SSH_PRIVATE_KEY for the match Repo
### MATCH_PASSWORD
on:
pull_request:
workflow_dispatch:
inputs:
devices:
description: 'JSON of devices. `{"Luka iPhone 6": "1234567890123456789012345678901234567890","Felix iPad Air 2": "abcdefghijklmnopqrstvuwxyzabcdefghijklmn"}`'
required: true
type: string
platform:
description: 'The platform'
required: true
default: 'ios'
type: choice
options:
- ios
- mac
jobs:
create_files:
name: Create certificates and profiles
runs-on: macOS-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install SSH key
uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Bundle install
run: bundle install
- name: Add device and regenerate profiles with match
run: bundle exec fastlane addDevicesGenerateProfiles
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASS }}
DEVICES: '{"Luka iPhone 6": "1234567890123456789012345678901234567890","Felix iPad Air 2": "abcdefghijklmnopqrstvuwxyzabcdefghijklmn"}'
PLATFORM: "ios"
- name: Clean up keychain
if: ${{ always() }}
run: bundle exec fastlane remove_keychain
continue-on-error: true