Skip to content

Commit 9c2f137

Browse files
authored
Merge pull request #2047 from woocommerce/feature/beta-builds-on-CI
Feature/beta builds on ci
2 parents 6e6b16f + bf1cb53 commit 9c2f137

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

.circleci/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,32 @@ jobs:
7272
- store_artifacts:
7373
path: Artifacts
7474
destination: Artifacts
75+
Release Build:
76+
executor:
77+
name: ios/default
78+
xcode-version: "11.2.1"
79+
environment:
80+
HOMEBREW_NO_AUTO_UPDATE: 1
81+
steps:
82+
- git/shallow-checkout
83+
- fix-circleci
84+
- ios/install-dependencies:
85+
bundle-install: true
86+
pod-install: true
87+
- run:
88+
name: Copy Secrets
89+
command: bundle exec fastlane run configure_apply
90+
- run:
91+
name: Install other tools
92+
command: |
93+
brew unlink python@2
94+
brew install imagemagick
95+
brew install ghostscript
96+
curl -sL https://sentry.io/get-cli/ | bash
97+
- run:
98+
name: Build
99+
command: "bundle exec fastlane build_and_upload_release skip_confirm:true"
100+
no_output_timeout: 60m
75101

76102
workflows:
77103
woocommerce_ios:
@@ -91,3 +117,12 @@ workflows:
91117
filters:
92118
branches:
93119
ignore: /pull\/[0-9]+/
120+
Release Build:
121+
jobs:
122+
- Release Build:
123+
filters:
124+
branches:
125+
ignore: /.*/
126+
tags:
127+
only: /^\d+(\.\d+)*$/
128+

fastlane/Fastfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ENV["APP_STORE_STRINGS_FILE_NAME"]="AppStoreStrings.pot"
6767
setfrozentag(repository:GHHELPER_REPO, milestone: new_version)
6868

6969
ios_localize_project()
70-
ios_tag_build()
70+
7171
get_prs_list(repository:GHHELPER_REPO, start_tag:"#{old_version}", report_path:"#{File.expand_path('~')}/wcios_prs_list_#{old_version}_#{new_version}.txt")
7272
end
7373

@@ -198,19 +198,22 @@ ENV["APP_STORE_STRINGS_FILE_NAME"]="AppStoreStrings.pot"
198198
# This lane builds the app and upload it for distribution
199199
# -----------------------------------------------------------------------------------
200200
# Usage:
201-
# bundle exec fastlane build_and_upload_release [skip_confirm:<skip confirm>]
201+
# bundle exec fastlane build_and_upload_release [skip_confirm:<skip confirm>] [create_gh_release:<create release on GH>]
202202
#
203203
# Example:
204204
# bundle exec fastlane build_and_upload_release
205205
# bundle exec fastlane build_and_upload_release skip_confirm:true
206206
#####################################################################################
207207
desc "Builds and updates for distribution"
208208
lane :build_and_upload_release do | options |
209+
final_tag = (is_ci() == true) ? ios_validate_ci_build() : false
210+
create_release = (final_tag && is_ci()) || options[:create_gh_release]
211+
209212
ios_build_prechecks(skip_confirm: options[:skip_confirm],
210213
internal: false,
211214
external: true)
212215
ios_build_preflight()
213-
build_and_upload_itc(skip_prechecks: true, skip_confirm: options[:skip_confirm])
216+
build_and_upload_itc(skip_prechecks: true, skip_confirm: options[:skip_confirm], create_release: create_release)
214217
end
215218

216219
#####################################################################################

0 commit comments

Comments
 (0)