Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upload Smoothie's metadata to Apple AppStore #7

Merged
merged 54 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d43525a
ios-metadata
teolemon Jan 23, 2022
55c4e22
Update ios-upload.yml
teolemon Jan 24, 2022
60c7b87
adding tooling
teolemon Jan 24, 2022
7ecabc0
Update ios-upload.yml
teolemon Jan 24, 2022
f988598
Update ios-upload.yml
teolemon Jan 24, 2022
9db3d58
simplify the workflow
teolemon Jan 24, 2022
8bae21d
Update ios-upload.yml
teolemon Mar 17, 2022
b41e932
Merge branch 'main' into ios-metadata
teolemon Mar 17, 2022
1379f96
Merge branch 'main' into ios-metadata
teolemon Mar 17, 2022
b658571
Update ios-upload.yml
teolemon Mar 17, 2022
43efde3
Create Gemfile
teolemon Mar 17, 2022
b780340
Create Gemfile.lock
teolemon Mar 17, 2022
c37b75f
Update ios-upload.yml
teolemon Mar 17, 2022
97294b3
Update Gemfile
teolemon Mar 17, 2022
6575322
Merge branch 'main' into ios-metadata
teolemon Apr 27, 2022
2273158
Update Fastfile
teolemon May 8, 2022
1fe9345
Update .github/workflows/ios-upload.yml
teolemon May 8, 2022
8352772
Update Gemfile.lock
teolemon May 8, 2022
b601192
Merge branch 'ios-metadata' of https://github.com/openfoodfacts/fastl…
teolemon May 8, 2022
06b1b2b
Update .github/workflows/ios-upload.yml
teolemon May 8, 2022
55acfa1
Update .github/workflows/ios-upload.yml
teolemon May 8, 2022
8a057c1
Update Fastfile
teolemon May 8, 2022
db31b4c
Update fastlane/Fastfile
teolemon May 8, 2022
1803b77
Update fastlane/Fastfile
teolemon May 8, 2022
fe83ad5
Update fastlane/Deliverfile
teolemon May 8, 2022
dcdb89f
Update fastlane/Fastfile
teolemon May 8, 2022
02009df
feat: add precheck lane for metadata
teolemon May 8, 2022
c960eec
feat: updates from production
teolemon May 8, 2022
e414515
Merge branch 'ios-metadata' of https://github.com/openfoodfacts/fastl…
teolemon May 8, 2022
153dcd9
Update fastlane/Deliverfile
teolemon May 8, 2022
1e78679
Update Fastfile
teolemon May 8, 2022
33fbd6d
Create Deliverfile
teolemon May 8, 2022
55f0921
reorg for both platforms
teolemon May 8, 2022
c4ad050
Merge branch 'ios-metadata' of https://github.com/openfoodfacts/fastl…
teolemon May 8, 2022
4f42174
Update Deliverfile
teolemon May 8, 2022
05e7c51
Update Deliverfile
teolemon May 8, 2022
b3c6e25
Update Deliverfile
teolemon May 8, 2022
bec13c2
Update fastlane/Fastfile
teolemon May 8, 2022
d39abeb
remove review info for now
teolemon May 8, 2022
1e29c49
Merge branch 'ios-metadata' of https://github.com/openfoodfacts/fastl…
teolemon May 8, 2022
7d41eb1
Update fastlane/Fastfile
teolemon May 8, 2022
fc45029
Update fastlane/Fastfile
teolemon May 8, 2022
1d15adf
fixes
teolemon May 8, 2022
38abbfb
Update .github/workflows/ios-upload.yml
teolemon May 8, 2022
d280579
Apply suggestions from code review
teolemon May 8, 2022
938429b
Apply suggestions from code review
teolemon May 8, 2022
ed65c66
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
e5752d7
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
61548d4
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
514209a
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
b3175d2
move folder
teolemon May 9, 2022
58ee146
Apply suggestions from code review
teolemon May 9, 2022
30e05d6
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
b97137a
Update .github/workflows/ios-upload.yml
teolemon May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ios-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Upload Metadata for iOS using Fastlane
on:
push:
branches:
- 'ios-metadata'

jobs:
testflight-release:
name: Build and deploy to TestFlight testers
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Version
run: echo ${{ env.RELEASE_VERSION }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.0.2
- name: Bundle install
run: cd ./fastlane && gem install bundler:1.17.3 && bundle install
teolemon marked this conversation as resolved.
Show resolved Hide resolved

- name: Decrypt AuthKey file
run: pwd && ls && cd ./fastlane/ios/envfiles && ./decrypt_secrets.sh && ls
teolemon marked this conversation as resolved.
Show resolved Hide resolved
env:
AUTH_KEY_FILE_DECRYPTKEY: ${{ secrets.AUTH_KEY_FILE_DECRYPTKEY }}

- name: Publish marketing assets
run: cd ./fastlane && bundle exec fastlane metadata
teolemon marked this conversation as resolved.
Show resolved Hide resolved
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PILOT_APPLE_ID: ${{ secrets.PILOT_APPLE_ID }}
SPACESHIP_CONNECT_API_ISSUER_ID: ${{ secrets.SPACESHIP_CONNECT_API_ISSUER_ID }}
SPACESHIP_CONNECT_API_KEY_ID: ${{ secrets.SPACESHIP_CONNECT_API_KEY_ID }}
SPACESHIP_CONNECT_API_KEY_FILEPATH: ./fastlane/envfiles/AuthKey_KDAUTTM76R.p8
CI_RELEASE: true

4 changes: 4 additions & 0 deletions fastlane/ios/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app_identifier "org.openfoodfacts.app"
team_id "ZC9CYWD334"
apple_id(ENV["FASTLANE_USER"])
itc_team_id(ENV["APP_STORE_CONNECT_TEAM_ID"])
9 changes: 9 additions & 0 deletions fastlane/ios/Deliverfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
force true # To go into non interactive mode
app_identifier "org.openfoodfacts.app"
username ENV["APPLE_ID"]
app_icon "./fastlane/metadata/Icon-App-iTunes.png"
screenshots_path "./fastlane/screenshots-ios"
metadata_path "./fastlane/metadata-ios"

#languages Metadata: List of languages to activate

104 changes: 104 additions & 0 deletions fastlane/ios/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
default_platform(:ios)

before_all do
xcversion(version: "~> 12.2")
end

platform :ios do
desc "Precheck metadata for Apple compliance"
lane :precheck do
precheck
end

desc "Push only description and meta info"
lane :metadata do

api_key = app_store_connect_api_key(
key_id: ENV["SPACESHIP_CONNECT_API_KEY_ID"],
issuer_id: ENV["SPACESHIP_CONNECT_API_ISSUER_ID"],
key_filepath: ENV["SPACESHIP_CONNECT_API_KEY_FILEPATH"]
)
deliver(
api_key: api_key,
skip_screenshots: false,
skip_metadata: false,
force: true, # To go into non interactive mode
precheck_include_in_app_purchases: false
)
end

desc "Sending metadata for Smoothie to TestFlight"
lane :beta do

APP_IDENTIFIER = "org.openfoodfacts.app"

puts "Sending metadata for identifier #{APP_IDENTIFIER}"

sync_code_signing(type: "appstore", readonly: is_ci, clone_branch_directly: false)
update_code_signing_settings(
path: "Runner.xcodeproj",
use_automatic_signing: false,
build_configurations: "Release",
code_sign_identity: 'iPhone Distribution',
profile_name: 'match AppStore org.openfoodfacts.app',
targets: ["Runner"]
)

update_project_team(
path: "Runner.xcodeproj",
teamid: "ZC9CYWD334"
)

# Upload to test flight
pilot(
app_identifier: APP_IDENTIFIER,
skip_submission: true,
skip_waiting_for_build_processing: true,
#ipa: "./Runner.ipa"
#skip_screenshots: false,
#skip_metadata: false
)
end


lane :setVersion do
begin

new_version_name = ENV["VERSION_NAME"]
new_version_name = new_version_name.to_s
new_version_name = new_version_name[8..-1]
puts new_version_name

api_key = app_store_connect_api_key(
key_id: ENV["SPACESHIP_CONNECT_API_KEY_ID"],
issuer_id: ENV["SPACESHIP_CONNECT_API_ISSUER_ID"],
key_filepath: ENV["SPACESHIP_CONNECT_API_KEY_FILEPATH"]
)


old_version_code = app_store_build_number(
live: false,
api_key: api_key,
app_identifier: "org.openfoodfacts.app",
initial_build_number: "0",
version: new_version_name
)
new_version_code = old_version_code.to_i + 1

puts "old_version_code: " + old_version_code.to_s
puts "new_version_code: " + new_version_code.to_s




flutter_set_version(
path_to_yaml: "../pubspec.yaml",
version_name: new_version_name,
version_code: new_version_code.to_s,
)
end
end



end
12 changes: 12 additions & 0 deletions fastlane/ios/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem "fastlane"
gem "fastlane-plugin-flutter_version", git: "https://github.com/tianhaoz95/fastlane-plugin-flutter-version"
gem "xcode-install"

plugins_path = File.join(File.dirname(__FILE__), './fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
Loading