-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (50 loc) · 1.95 KB
/
action.yml
File metadata and controls
50 lines (50 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Create native bundle"
description: "Create a native bundle for android / iOS"
inputs:
platform:
description: "Target platform (android or ios)"
required: true
mda-file:
description: "Path to the deployment package"
required: true
runs:
using: composite
steps:
- name: "Make sure curl is installed"
run: |
apt update && apt upgrade -y
apt install curl -y
shell: bash
- name: "Download test project"
run: curl -L -o project.zip https://github.com/mendix/Native-Mobile-Resources/archive/refs/heads/mx-version/10.zip
shell: bash
- name: "Extract test project"
uses: montudor/action-zip@v1.0.0
with:
args: unzip -qq project.zip
- name: "Rename extracted directory"
run: mv Native-Mobile-Resources-mx-version-10 Native-Mobile-Resources-mx10
shell: bash
- name: "Extract deployment package"
uses: montudor/action-zip@v1.0.0
with:
args: unzip -qq ${{ inputs.mda-file }} -d Native-Mobile-Resources-mx10/deployment
- name: "Create bundle for ${{ inputs.platform }}"
run: |
mkdir -p ${{ inputs.platform }}/assets
cd Native-Mobile-Resources-mx10/deployment/native && \
/tmp/mxbuild/modeler/tools/node/linux-x64/node \
/tmp/mxbuild/modeler/tools/node/node_modules/react-native/cli.js \
bundle --verbose --platform ${{ inputs.platform }} --dev false \
--config "$PWD/metro.config.js" \
--bundle-output $GITHUB_WORKSPACE/${{ inputs.platform }}/index.${{ inputs.platform }}.bundle \
--assets-dest $GITHUB_WORKSPACE/${{ inputs.platform }}/assets/ \
--entry-file ./index.js
shell: bash
env:
NODE_OPTIONS: --max_old_space_size=6144
- name: "Upload bundle for ${{ inputs.platform }}"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ inputs.platform }}-bundle
path: ${{ inputs.platform }}