This repository was archived by the owner on Oct 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 84
94 lines (81 loc) · 3.01 KB
/
beta-automation.yml
File metadata and controls
94 lines (81 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- beta-*
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macOS-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Force Xcode 12.0
run: sudo xcode-select -switch /Applications/Xcode_12.0.app
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Install bundles if no cache
- name: Move to checked out directory
run: |
ls -la
cd $GITHUB_WORKSPACE
# Use cached ruby bundles if available
- uses: actions/cache@v1
id: cache-bundles
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
# Install bundles if no cache
- name: Install bundles
if: steps.cache-bundles.outputs.cache-hit != 'true'
run: bundle install
# Use cached pods if available
- uses: actions/cache@v2
id: cache-pods
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
# Install pods if no cache
- name: Install pods
if: steps.cache-pods.outputs.cache-hit != 'true'
run: pod install
# Restore cached SwiftPM packages if available
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
# https://github.community/t/ios-code-signing-provisioning/16614/4
# https://github.com/hashicorp/terraform-github-actions/issues/39
- name: Setup SSH Keys and known_hosts for fastlane match
env:
PRIVATE_KEY: ${{ secrets.MATCH_DEPLOY_PRIVATE_KEY }}
# Copied from https://github.com/maddox/actions/blob/master/ssh/entrypoint.sh
run: |
echo Force SSH connection
git config --global --add url."git@github.com:".insteadOf "https://github.com/"
echo Setup Github credentials
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
SSH_PATH="$HOME/.ssh"
mkdir -p "$SSH_PATH"
touch "$SSH_PATH/known_hosts"
echo "$PRIVATE_KEY" > "$SSH_PATH/id_rsa"
chmod 700 "$SSH_PATH"
ssh-keyscan github.com >> ~/.ssh/known_hosts
chmod 600 "$SSH_PATH/known_hosts"
chmod 600 "$SSH_PATH/id_rsa"
eval $(ssh-agent)
ssh-add "$SSH_PATH/id_rsa"
- name: Fastlane Action
run: bundle exec fastlane beta --verbose
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}