Skip to content

Setup release pipeline #8

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c0978f6
Test pipeline
UrazAkgultan Mar 25, 2024
2dbf73e
update packagelock
UrazAkgultan May 8, 2024
f09530e
Add google service config files
UrazAkgultan May 8, 2024
7984031
add actions ios
stelselim May 14, 2024
087a355
new ios test workflow
stelselim May 14, 2024
4c395a8
ios file name change
stelselim May 14, 2024
67680a0
clean start on fastfile
stelselim May 21, 2024
dcfcf12
add fastlane command to yaml.
stelselim May 21, 2024
8c34d58
fastlane command fix
stelselim May 21, 2024
181b63c
fastfile update and environment variables addition
stelselim May 22, 2024
18184a4
temporary keychain feature
stelselim May 22, 2024
36b331b
fastlane signing method changed to match
stelselim May 23, 2024
e519303
test script added.
stelselim May 23, 2024
35d7027
read only mode disabled
stelselim May 24, 2024
463eb4c
removed test script
stelselim May 24, 2024
cc6b570
disable automatic code signing
stelselim May 24, 2024
f5eeb88
disabling code signing function moved up.
stelselim May 24, 2024
826552c
update github action
UrazAkgultan May 23, 2024
ed90175
keychain function added.
stelselim May 27, 2024
464e428
small fix for fastfile
stelselim May 27, 2024
09234a8
keychain password added
stelselim May 27, 2024
85b828d
add the environment variable to action
stelselim May 27, 2024
62f5b45
add missing keychain name
stelselim May 27, 2024
068c245
small fix
stelselim May 27, 2024
0ba67c1
remove overwritten texts from fastlane
stelselim May 27, 2024
3d4e020
Merge pull request #10 from mendix/feat-setup-release-pipeline-ios
stelselim May 27, 2024
0b4f913
remove sensitive data
stelselim May 28, 2024
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
61 changes: 61 additions & 0 deletions .github/actions/build_android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 'Build Android App'
description: 'Builds the Android app using Fastlane'
inputs:
firebaseAPIKey:
required: true
keystorePath:
required: true
keystoreAlias:
required: true
keystorePassword:
required: true
keystoreKeyPassword:
required: true

runs:
using: 'composite'

steps:
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Install Fastlane
run: gem install fastlane
shell: bash

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Build Android Library with Fastlane
run: |
cd android
fastlane android local
shell: bash
env:
FIREBASE_API_KEY: ${{ inputs.firebaseAPIKey }}
ANDROID_KEYSTORE_PATH: ${{ inputs.keystorePath }}
ANDROID_KEYSTORE_PASSWORD: ${{ inputs.keystorePassword }}
ANDROID_KEYSTORE_ALIAS: ${{ inputs.keystoreAlias }}
ANDROID_KEYSTORE_KEY_PASSWORD: ${{ inputs.keystoreKeyPassword }}

- name: Copy Android Library to Shared Directory
run: |
mkdir -p ${{ github.workspace }}/artifacts/android
cp ./artifacts/app-production-debug.apk ${{ github.workspace }}/artifacts/android/app-production-debug.apk
shell: bash

- name: Upload apk to artifact
uses: actions/upload-artifact@v4
with:
name: android
path: ${{ github.workspace }}/artifacts/android/
24 changes: 24 additions & 0 deletions .github/actions/build_ios/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Build & Upload iOS App'
description: 'Build and upload the iOS app using Fastlane'

runs:
using: 'composite'

steps:
- name: "Set up Ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'

- name: Install Fastlane
run: gem install fastlane
shell: bash

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Run Fastlane
run: cd ios && fastlane ios release
shell: bash
35 changes: 35 additions & 0 deletions .github/workflows/BuildAndroid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Build Android"

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Retrieve the secrets and decode it to a file
env:
UPLOAD_KEYSTORE_BASE64: ${{ secrets.UPLOAD_KEYSTORE_BASE64 }}
PLAY_STORE_CREDENTIALS_BASE64: ${{ secrets.PLAY_STORE_CREDENTIALS_BASE64 }}
run: |
echo $UPLOAD_KEYSTORE_BASE64 | base64 --decode > ./android/keystores/upload.keystore
echo $PLAY_STORE_CREDENTIALS_BASE64 | base64 --decode > ./android/fastlane/play-store-credentials.json
shell: bash

- name: Build Android apk
uses: ./.github/actions/build_android
with:
firebaseAPIKey: ${{ secrets.FIREBASE_API_KEY }}
keystorePath: ${{ env.ANDROID_KEYSTORE_PATH }}
keystoreAlias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
keystorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keystoreKeyPassword: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
29 changes: 29 additions & 0 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Build & Upload iOS App"

on:
push:
branches:
- feat/setup-release-pipeline

pull_request:
branches:
- main

jobs:
test:
runs-on: macOS-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build & Upload iOS App
uses: ./.github/actions/build_ios
env:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }}
13 changes: 4 additions & 9 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@

default_platform(:android)

ENV["GRADLE_BINTRAY_REPO"] = ENV["NEXUS_BINTRAY_PROXY_URL"]
ENV["GRADLE_JITPACK_REPO"] = ENV["NEXUS_JITPACK_PROXY_URL"]

GOOGLE_PLAY_VERSION = sh("node -p -e \"require('../../package.json')['store-versions']['google-play']\"").chomp
BUILD_NUMBER = ENV["BUILD_NUMBER"]
TEST = ENV["TEST"]
ORIGINAL_CHANGELOG_PATH = "../../CHANGELOG.android.txt"
FASTLANE_CHANGELOG_PATH = "./metadata/android/en-US/changelogs/default.txt"
versionCodeOffset = 304

platform :android do
before_all do
Dir.chdir("../..") do
sh("npm", "ci", "--legacy-peer-deps")
sh("npm", "ci")
# Special hack to work-around alpine linux problem - File.getCanonicalPath is failing without a reason:
sh("find node_modules -name '*.gradle' -type f -exec sed -i.bak '/canonicalPath/d' {} +")
end
Expand All @@ -37,7 +35,6 @@ platform :android do
desc "Build apk and install in the simulator"
lane :debug_internal do
UI.message("Installing dependencies")
sh("npm", "i", "--legacy-peer-deps")
gradleOptions = {
"android.injected.version.code" => BUILD_NUMBER.to_i() + versionCodeOffset,
"android.injected.version.name" => "#{GOOGLE_PLAY_VERSION}.dev",
Expand Down Expand Up @@ -74,10 +71,8 @@ platform :android do

UI.message "Replacing Firebase API keys from environment variables"
Dir.chdir("../app") do
firebaseApiKey1 = ENV["FIREBASE_API_KEY_1"] || "FIREBASE_API_KEY_1"
sh("sed -i 's/{{firebase-api-key-1}}/#{firebaseApiKey1}/g' google-services.json")
firebaseApiKey2 = ENV["FIREBASE_API_KEY_2"] || "FIREBASE_API_KEY_2"
sh("sed -i 's/{{firebase-api-key-2}}/#{firebaseApiKey2}/g' google-services.json")
firebaseApiKey = ENV["FIREBASE_API_KEY"] || "FIREBASE_API_KEY"
sh("sed -i 's/{{firebase-api-key}}/#{firebaseApiKey}/g' google-services.json")
end

if options[:submit] == true
Expand Down
Binary file modified ios/DeveloperApp/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
boost: 57d2868c099736d80fcd648bf211b4431e51a558
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
Expand Down Expand Up @@ -1141,7 +1141,7 @@ SPEC CHECKSUMS:
Permission-PhotoLibrary: ddb5a158725b29cb12e9e477e8a5f5151c66cc3c
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
QRCodeReader.swift: 373a389fe9a22d513c879a32a6f647c58f4ef572
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: 83bca1c184feb4d2e51c72c8369b83d641443f95
RCTTypeSafety: 13c4a87a16d7db6cd66006ce9759f073402ef85b
React: e67aa9f99957c7611c392b5e49355d877d6525e2
Expand Down Expand Up @@ -1225,4 +1225,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 5aa659dbdffe4dac60d7c41c77158d6182cc0f9c

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
6 changes: 3 additions & 3 deletions ios/developerapp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 23;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = BC32QNM6AD;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = BC32QNM6AD;
Expand Down Expand Up @@ -803,7 +803,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = BC32QNM6AD;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = BC32QNM6AD;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1068,7 +1068,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = BC32QNM6AD;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = BC32QNM6AD;
ENABLE_BITCODE = NO;
Expand Down
4 changes: 1 addition & 3 deletions ios/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
app_identifier "com.mendix.developerapp.native.mx10" # The bundle identifier of your app
app_identifier("com.mendix.developerapp.native.mx10")

team_id "BC32QNM6AD" # Developer Portal Team ID

# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
Loading
Loading