Skip to content

Commit 04f42a2

Browse files
committed
Implement build pipeline
1 parent fe03c96 commit 04f42a2

File tree

15 files changed

+626
-234
lines changed

15 files changed

+626
-234
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Build Android Library'
2+
description: 'Builds the Android library using Fastlane'
3+
4+
runs:
5+
using: 'composite'
6+
7+
steps:
8+
- name: Set up JDK
9+
uses: actions/setup-java@v3
10+
with:
11+
distribution: 'temurin'
12+
java-version: 11
13+
14+
- name: Set up Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: '2.7'
18+
19+
- name: Install Fastlane
20+
run: gem install fastlane
21+
shell: bash
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version-file: .nvmrc
27+
28+
- name: Build Android Library with Fastlane
29+
run: cd android && fastlane android build_mendix_native
30+
shell: bash
31+
32+
- name: Copy Android Library to Shared Directory
33+
run: mkdir -p ${{ github.workspace }}/shared/libs/android && cp ./artifacts/aar/mendixnative-release.aar ${{ github.workspace }}/shared/libs/android/mendixnative-release.aar
34+
shell: bash
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Build iOS Library'
2+
description: 'Builds the iOS library using Fastlane'
3+
4+
runs:
5+
using: 'composite'
6+
7+
steps:
8+
- name: Install Fastlane
9+
run: gem install fastlane
10+
shell: bash
11+
12+
- name: Setup Node
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version-file: .nvmrc
16+
17+
- name: Build iOS Library with Fastlane
18+
run: cd ios && fastlane ios build_mendix_native
19+
shell: bash
20+
21+
- name: Copy iOS Library to Shared Directory
22+
run: mkdir -p ${{ github.workspace }}/shared/libs/ios && cp ./ios/build/mendixnative/mendixnative.xcframework ${{ github.workspace }}/shared/libs/ios/mendixnative.xcframework
23+
shell: bash

.github/actions/setup/action.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/BuildLibrary.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Build @mendix/native'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build-android:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Build Android Library
20+
uses: ./.github/actions/build_android
21+
22+
build-ios:
23+
runs-on: macos-latest
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Build iOS Library
30+
uses: ./.github/actions/build_ios
31+
32+
create-release:
33+
needs: [build-android, build-ios]
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v3
39+
40+
- name: Zip Libraries
41+
run: |
42+
cd ${{ github.workspace }}/shared/libs
43+
zip -r libraries.zip .
44+
45+
- name: Upload Libraries to Artifacts
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: mendixnative-archive
49+
path: ${{ github.workspace }}/shared/libs/libraries.zip

.github/workflows/ci.yml

Lines changed: 0 additions & 154 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ android/keystores/debug.keystore
6969
# Turborepo
7070
.turbo/
7171

72-
# generated by bob
73-
lib/
74-
7572
# fastlane specific
7673
**/fastlane/report.xml
7774

@@ -86,3 +83,5 @@ lib/
8683

8784
# Fastlane.swift runner binary
8885
**/fastlane/FastlaneRunner
86+
87+
/artifacts/*

ios/fastlane/Fastfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ fastlane_version "2.213.0"
88
default_platform :ios
99

1010
platform :ios do
11-
11+
1212
desc "Build a new version of MendixNative lib"
13-
lane :build_mendixnative do |options|
13+
lane :build_mendix_native do |options|
1414
sh("npm", "ci", "--legacy-peer-deps")
1515
cocoapods
1616

ios/fastlane/report.xml

Lines changed: 0 additions & 48 deletions
This file was deleted.

lib/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.npmrc
2+
androidlib/*.aar
3+
ios/mendixnative.xcframework/*
4+
node_modules
5+
artifacts

0 commit comments

Comments
 (0)