Skip to content

Instantly share code, notes, and snippets.

View mariia-cherniuk's full-sized avatar

Mariia Cherniuk mariia-cherniuk

  • London, United Kingdom
View GitHub Profile
module Fastlane
module Actions
class JiraTransitionTicketsAction < Action
def self.run(params)
Actions.verify_gem!('jira-ruby')
require 'jira-ruby'
site = params[:url]
auth_type = :basic
module Fastlane
module Actions
class SetJiraFixVersionForkAction < Action
def self.run(params)
Actions.verify_gem!('jira-ruby')
require 'jira-ruby'
site = params[:url]
auth_type = params[:auth_type]
use_cookies = params[:use_cookies]
desc "Releases a \"Pending Developer Release\" version"
lane :release_to_users do
move_to_ready_for_sale
slack(message: slack_announcement, default_payloads: [])
end
private_lane :move_to_ready_for_sale do
ENV['FASTLANE_USER'] = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
gs_move_to_ready_for_sale(app_identifier: "your_app_identifier")
end
deploy-appstore:
only:
refs:
- develop
needs: [minor-version-bump]
stage: deploy-appstore
tags: [osx]
when: manual
allow_failure: false
script:
desc "Minor version bump"
lane :bump_version do
Actions.sh("git remote set-url origin git@github.com:your_app_git_url")
minor_version_bump(branch: ENV['DEVELOP_BRANCH'])
end
private_lane :minor_version_bump do |options|
reset_git_repo(force: true, skip_clean: true)
git_checkout(remote_branch: options[:branch])
git_pull
minor-version-bump:
only:
refs:
- develop
needs: [publish-github-release]
stage: minor-version-bump
tags: [osx]
allow_failure: false
script:
- bundle exec fastlane bump_version
desc "Publish GitHub release"
lane :publish_github_release do
Actions.sh("git remote set-url origin git@github.com:your_app_git_url")
git_checkout(remote_branch: ENV['MASTER_BRANCH'])
git_pull
version_number = ENV['MPG_VERSION_NUMBER'].to_s.empty? ? get_version_number : ENV['MPG_VERSION_NUMBER']
publish_github_version_release(branch: ENV['MASTER_BRANCH'], version: version_number)
end
private_lane :publish_github_version_release do |options|
publish-github-release:
only:
refs:
- develop
needs: [publish-jira-release, submit-appstore]
stage: publish-github-release
tags: [osx]
dependencies:
- submit-appstore
allow_failure: false
desc "Upload symbols to Crashlytics"
lane :upload_symbols do
upload_symbols_to_crashlytics(dsym_path: "build/AppStore.app.zip", gsp_path: "Firebase/GoogleService-App.plist")
end
upload-symbols:
only:
refs:
- develop
needs: [submit-appstore]
stage: publish-artifacts
tags: [osx]
allow_failure: false
script:
- bundle exec fastlane upload_symbols