Skip to content

Commit

Permalink
Merge pull request #396 from nimblehq/release/3.12.0
Browse files Browse the repository at this point in the history
Release - 3.12.0
  • Loading branch information
vnntsu authored Nov 30, 2022
2 parents 5490f1a + a16fe91 commit d27748f
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 10 deletions.
26 changes: 26 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: 'Features'
labels:
- 'type : feature'
- title: 'Chores'
label:
- 'type : chore'
- title: 'Bugs'
labels:
- 'type : bug'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
minor:
labels:
- 'type : feature'
- 'type : chore'
patch:
labels:
- 'type : bug'
default: minor

template: |
$CHANGES
12 changes: 11 additions & 1 deletion .github/workflows/deploy_AppStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,14 @@ jobs:
- name: Build App and Distribute to AppStore
run: bundle exec fastlane build_and_upload_appstore_app
env:
APPSTORE_CONNECT_API_KEY: ${{ secrets.APPSTORE_CONNECT_API_KEY }}
APPSTORE_CONNECT_API_KEY: ${{ secrets.APPSTORE_CONNECT_API_KEY }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ format('v{0}({1})-{2}', env.VERSION_NUMBER, env.BUILD_NUMBER, env.TAG_TYPE) }}
path: |
${{ env.IPA_OUTPUT_PATH }}
${{ env.DSYM_OUTPUT_PATH }}
env:
TAG_TYPE: App_Store
12 changes: 11 additions & 1 deletion .github/workflows/deploy_Firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,14 @@ jobs:
- name: Build App and Distribute to Firebase
run: bundle exec fastlane build_and_upload_staging_app
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ format('v{0}({1})-{2}', env.VERSION_NUMBER, env.BUILD_NUMBER, env.TAG_TYPE) }}
path: |
${{ env.IPA_OUTPUT_PATH }}
${{ env.DSYM_OUTPUT_PATH }}
env:
TAG_TYPE: Staging_Firebase
12 changes: 11 additions & 1 deletion .github/workflows/deploy_Release_Firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,14 @@ jobs:
- name: Build Production App and Distribute to Firebase
run: bundle exec fastlane build_and_upload_production_app
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ format('v{0}({1})-{2}', env.VERSION_NUMBER, env.BUILD_NUMBER, env.TAG_TYPE) }}
path: |
${{ env.IPA_OUTPUT_PATH }}
${{ env.DSYM_OUTPUT_PATH }}
env:
TAG_TYPE: Production_Firebase
18 changes: 18 additions & 0 deletions .github/workflows/draft-a-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Draft a new release

on:
push:
branches:
- main
permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test_upload_build_to_test_flight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
build:
name: Build
runs-on: macOS-latest
runs-on: macOS-12
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down
6 changes: 6 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ post_install do |installer|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['ENABLE_BITCODE'] = 'NO'
# Fix some pods creating bundle, asking for signing
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
end
2 changes: 1 addition & 1 deletion Project.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ProjectDescription
import ProjectDescriptionHelpers

let project = Project.project(name: "{PROJECT_NAME}", bundleId: "{BUNDLE_ID_PRODUCTION}")
let project = Project.project(name: "{PROJECT_NAME}", bundleId: "${PRODUCT_BUNDLE_IDENTIFIER}")

extension Project {

Expand Down
12 changes: 12 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ workflows:
title: Build and upload Production app to App Store
inputs:
- lane: build_and_upload_appstore_app
- deploy-to-bitrise-io:
inputs:
- deploy_path: $BUILD_PATH
is_always_run: false
- cache-push@2:
inputs:
- cache_paths: |-
Expand Down Expand Up @@ -83,6 +87,10 @@ workflows:
title: Build and Upload Production App
inputs:
- lane: build_and_upload_production_app
- deploy-to-bitrise-io:
inputs:
- deploy_path: $BUILD_PATH
is_always_run: false
- cache-push@2:
inputs:
- cache_paths: |-
Expand Down Expand Up @@ -124,6 +132,10 @@ workflows:
title: Build and Upload Staging App
inputs:
- lane: build_and_upload_staging_app
- deploy-to-bitrise-io:
inputs:
- deploy_path: $BUILD_PATH
is_always_run: false
- cache-push@2:
inputs:
- cache_paths: |-
Expand Down
8 changes: 8 additions & 0 deletions fastlane/Constants/Environments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ def self.SKIP_FIREBASE_DSYM
def self.BUMP_APP_STORE_BUILD_NUMBER
ENV['BUMP_APP_STORE_BUILD_NUMBER']
end

def self.GITHUB_ACTIONS
ENV['GITHUB_ACTIONS']
end

def self.BITRISE_IO
ENV['BITRISE_IO']
end
end
14 changes: 12 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require './Managers/SymbolManager'
require './Managers/DistributionManager'
require './Managers/MatchManager'
require './Managers/TestManager'
require './Managers/EnvironmentManager'

test_manager = TestManager.new(
fastlane: self,
Expand Down Expand Up @@ -38,6 +39,13 @@ match_manager = MatchManager.new(
username: DeliverableConstants.DEV_PORTAL_APPLE_ID
)

environment_manager = EnvironmentManager.new(
fastlane: self,
is_github_actions: Environments.GITHUB_ACTIONS,
is_bitrise: Environments.BITRISE_IO,
build_path: Constants.BUILD_PATH
)

before_all do
ensure_bundle_exec
end
Expand Down Expand Up @@ -119,6 +127,7 @@ platform :ios do
product_name: Constants.PRODUCT_NAME_STAGING,
gsp_name: DeliverableConstants.GSP_STAGING
)
environment_manager.save_build_context_to_ci(version_number: versioning_manager.version_number)
end

desc 'Build and upload Production app to Firebase'
Expand All @@ -139,6 +148,7 @@ platform :ios do
product_name: Constants.PRODUCT_NAME_PRODUCTION,
gsp_name: DeliverableConstants.GSP_PRODUCTION
)
environment_manager.save_build_context_to_ci(version_number: versioning_manager.version_number)
end

desc 'upload develop build to Firebase app distribution'
Expand Down Expand Up @@ -183,8 +193,7 @@ platform :ios do
builder.build_app_store(
Constants.SCHEME_NAME_PRODUCTION,
Constants.PRODUCT_NAME_PRODUCTION,
Constants.BUNDLE_ID_PRODUCTION,
true
Constants.BUNDLE_ID_PRODUCTION
)
upload_build_to_appstore
if (Environments.SKIP_FIREBASE_DSYM || '') == ''
Expand All @@ -193,6 +202,7 @@ platform :ios do
gsp_name: DeliverableConstants.GSP_PRODUCTION
)
end
environment_manager.save_build_context_to_ci(version_number: versioning_manager.version_number)
end

desc 'upload develop build to App Store'
Expand Down
4 changes: 1 addition & 3 deletions fastlane/Managers/BuildManager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ def build_ad_hoc(scheme, product_name, bundle_identifier)
bundle_identifier => "match AdHoc #{bundle_identifier}"
}
},
include_bitcode: false,
output_name: product_name,
disable_xcpretty: true
)
end

def build_app_store(scheme, product_name, bundle_identifier, include_bitcode)
def build_app_store(scheme, product_name, bundle_identifier)
@fastlane.gym(
scheme: scheme,
export_method: 'app-store',
Expand All @@ -29,7 +28,6 @@ def build_app_store(scheme, product_name, bundle_identifier, include_bitcode)
bundle_identifier => "match AppStore #{bundle_identifier}"
}
},
include_bitcode: include_bitcode,
output_name: product_name
)
end
Expand Down
26 changes: 26 additions & 0 deletions fastlane/Managers/EnvironmentManager.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

class EnvironmentManager
def initialize(fastlane:, is_github_actions:, is_bitrise:, build_path:)
@fastlane = fastlane
@is_github_actions = is_github_actions
@is_bitrise = is_bitrise
@build_path = build_path
end

def save_build_context_to_ci(version_number:)
ipa_path = Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::IPA_OUTPUT_PATH]
dsym_path = Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::DSYM_OUTPUT_PATH]
build_number = Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::BUILD_NUMBER]

if @is_github_actions
@fastlane.sh("echo IPA_OUTPUT_PATH=#{ipa_path} >> $GITHUB_ENV")
@fastlane.sh("echo DSYM_OUTPUT_PATH=#{dsym_path} >> $GITHUB_ENV")
@fastlane.sh("echo BUILD_NUMBER=#{build_number} >> $GITHUB_ENV")
@fastlane.sh("echo VERSION_NUMBER=#{version_number} >> $GITHUB_ENV")
end
if @is_bitrise
@fastlane.sh("envman add --key BUILD_PATH --value '#{@build_path}'")
end
end
end

0 comments on commit d27748f

Please sign in to comment.