-
Notifications
You must be signed in to change notification settings - Fork 17
134 lines (120 loc) · 5.21 KB
/
build-test.yml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Create feature build
on:
workflow_call:
inputs:
with_high_priority:
required: true
type: boolean
move_to_rft:
required: true
type: boolean
lane:
required: true
type: string
branch:
required: false
type: string
jobs:
upload_build_for_testing:
name: Manually upload build for testing
runs-on: ${{ (inputs.with_high_priority && fromJSON('[ "self-hosted", "macOS" ]')) || 'macos-13' }}
env:
# Override fastlane tooling variables
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 180
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 10
XCODE_VERSION: "15.0"
steps:
- name: Cleanup build folder
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Check out current branch
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch != '' && inputs.branch || github.event.pull_request.head.ref }}
# submodules: recursive
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Select XCode Version
run: sudo xcode-select --switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Get last changes
id: get-changelog
shell: bash
run: |
echo "GIT_CHANGES=$(git log --oneline -n 15)" >> $GITHUB_ENV
- name: Generate secret files and check it
run: |
curl -o ./p2p_wallet/Config.xcconfig ${{ secrets.XCCONFIG_URL }}
chmod u+x Scripts/checkSecrets.sh && Scripts/checkSecrets.sh
shell: bash
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install project
env:
IS_CI: 'true'
run: |
chmod u+x Scripts/install.sh && Scripts/install.sh
shell: bash
- name: Upload to test
uses: maierj/fastlane-action@v2.2.0
with:
lane: ${{ inputs.lane }}
env:
DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}'
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}'
DEVELOPER_APP_ID_TEST: '${{ secrets.DEVELOPER_APP_ID_TEST }}'
PROVISIONING_PROFILE_SPECIFIER_ADHOC: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER_ADHOC }}'
PROVISIONING_PROFILE_SPECIFIER_APPSTORE: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER_APPSTORE }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
PROVISIONING_REPO: '${{ secrets.PROVISIONING_REPO }}'
FIREBASE_APP_ID: '${{ secrets.FIREBASE_APP_ID }}'
FIREBASE_APP_ID_TEST: '${{ secrets.FIREBASE_APP_ID_TEST }}'
FIREBASE_CLI_TOKEN: '${{ secrets.FIREBASE_CLI_TOKEN }}'
BROWSERSTACK_USERNAME: '${{ secrets.BROWSERSTACK_USERNAME }}'
BROWSERSTACK_ACCESS_KEY: '${{ secrets.BROWSERSTACK_ACCESS_KEY }}'
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
IS_CI: '${{ secrets.IS_CI }}'
SLACK_API_TOKEN: '${{ secrets.SLACK_API_TOKEN }}'
JIRA_BASE_URL: '${{ secrets.JIRA_BASE_URL }}'
GIT_CHANGELOG: '${{ env.GIT_CHANGES }}'
SENTRY_TOKEN: '${{ secrets.SENTRY_TOKEN }}'
BROWSERSTACK_USERNAME_NEW: '${{ secrets.BROWSERSTACK_USERNAME_NEW }}'
BROWSERSTACK_ACCESS_KEY_NEW: '${{ secrets.BROWSERSTACK_ACCESS_KEY_NEW }}'
DISCORD_IOS_BUILD_CHANNEL_ID: '${{ secrets.DISCORD_IOS_BUILD_CHANNEL_ID }}'
DISCORD_MESSAGE_API_ENDPOINT: '${{ secrets.DISCORD_MESSAGE_API_ENDPOINT }}'
DISCORD_MESSAGE_API_BEARER_TOKEN: '${{ secrets.DISCORD_MESSAGE_API_BEARER_TOKEN }}'
- name: Login to JIRA
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Find JIRA issue from branchname
id: find_issue
if: ${{ env.BRANCH_NAME }}
uses: atlassian/gajira-find-issue-key@master
with:
string: ${{ env.BRANCH_NAME }}
from: ""
- name: Comment on issue
if: ${{ steps.find_issue.outputs.issue }}
uses: atlassian/gajira-comment@master
with:
issue: ${{ steps.find_issue.outputs.issue }}
comment: "A build ${{ env.BUILD_NUMBER }} added for testing this issue"
- name: Move issue to READY FOR TESTING
if: ${{ inputs.move_to_rft && steps.find_issue.outputs.issue }}
uses: atlassian/gajira-transition@master
with:
issue: ${{ steps.find_issue.outputs.issue }}
transition: ${{ secrets.JIRA_READY_FOR_TESTING_TRANSITION_NAME }}