Skip to content

Commit cf1b7b7

Browse files
Introducing develop branch (#523)
1 parent 8c75a65 commit cf1b7b7

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/publish-release.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,26 @@ on:
77
types:
88
- closed
99

10-
workflow_dispatch:
11-
inputs:
12-
version:
13-
description: 'Provide release version'
14-
type: string
15-
required: true
16-
1710
jobs:
1811
release:
1912
name: Publish new release
2013
runs-on: macos-13
21-
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.pull_request.head.ref, 'release/')
14+
if: github.event.pull_request.merged == true # only merged pull requests must trigger this job
2215
steps:
2316
- name: Install Bot SSH Key
2417
uses: webfactory/[email protected]
2518
with:
2619
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
2720
- uses: actions/[email protected]
2821
- name: Extract version from branch name (for release branches)
22+
if: startsWith(github.event.pull_request.head.ref, 'release/')
2923
run: |
30-
if [[ "${{ github.event.inputs.version }}" != "" ]]; then
31-
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
32-
else
33-
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
34-
VERSION=${BRANCH_NAME#release/}
35-
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
36-
fi
24+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
25+
VERSION=${BRANCH_NAME#release/}
26+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
3727
- uses: ./.github/actions/ruby-cache
3828
- name: "Fastlane - Publish Release"
29+
if: startsWith(github.event.pull_request.head.ref, 'release/')
3930
env:
4031
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
4132
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

fastlane/Fastfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ source_packages_path = 'spm_cache'
1616
buildcache_xcargs = 'CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++'
1717
is_localhost = !is_ci
1818
@force_check = false
19-
develop_branch = 'main'
2019

2120
before_all do |lane|
2221
if is_ci
@@ -90,6 +89,7 @@ lane :publish_release do |options|
9089
clean_products
9190

9291
publish_ios_sdk(
92+
skip_git_status_check: false,
9393
version: options[:version],
9494
sdk_names: sdk_names,
9595
podspec_names: ['StreamChatSwiftUI', 'StreamChatSwiftUI-XCFramework'],
@@ -208,7 +208,7 @@ end
208208

209209
desc 'Runs e2e ui tests using mock server in Debug config'
210210
lane :test_e2e_mock do |options|
211-
# next unless is_check_required(sources: sources_matrix[:e2e], force_check: @force_check) # TESTING THIS NOW
211+
next unless is_check_required(sources: sources_matrix[:e2e], force_check: @force_check)
212212

213213
start_sinatra
214214

@@ -434,7 +434,7 @@ lane :copyright do
434434
end
435435

436436
private_lane :create_pr do |options|
437-
options[:base_branch] ||= develop_branch
437+
options[:base_branch] ||= 'develop'
438438
sh("git checkout -b #{options[:head_branch]}")
439439
sh('git add -A')
440440
sh("git commit -m '#{options[:title]}'")

0 commit comments

Comments
 (0)