Skip to content

Commit f10acde

Browse files
committed
Merge branch 'main' into agents-view
2 parents 988664d + b237b36 commit f10acde

File tree

240 files changed

+13996
-2161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+13996
-2161
lines changed
Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,62 @@
11
name: prepare-ios-build
22
description: Action to prepare environment for ios build
33

4+
inputs:
5+
intune-enabled:
6+
description: 'Enable Intune MAM features (requires Xcode 26.1+)'
7+
required: false
8+
default: 'false'
9+
intune-ssh-private-key:
10+
description: 'SSH private key for Intune submodule repository access (required if intune-enabled is true)'
11+
required: false
12+
413
runs:
514
using: composite
615
steps:
716
- name: ci/setup-xcode
817
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
918
with:
10-
xcode-version: latest-stable
19+
xcode-version: '26.1'
1120

1221
- name: ci/prepare-mobile-build
1322
uses: ./.github/actions/prepare-mobile-build
1423

15-
- name: ci/install-pods-dependencies
24+
- name: ci/setup-intune
25+
if: inputs.intune-enabled == 'true'
26+
uses: ./.github/actions/setup-intune
27+
with:
28+
ssh-private-key: ${{ inputs.intune-ssh-private-key }}
29+
30+
- name: Get Intune submodule commit hash
31+
if: inputs.intune-enabled == 'true'
32+
id: intune-hash
1633
shell: bash
1734
run: |
18-
echo "::group::install-pods-dependencies"
19-
npm run ios-gems
20-
npm run pod-install
21-
echo "::endgroup::"
35+
if [ -e "libraries/@mattermost/intune/.git" ]; then
36+
INTUNE_HASH=$(cd libraries/@mattermost/intune && git rev-parse --short HEAD)
37+
echo "hash=${INTUNE_HASH}" >> $GITHUB_OUTPUT
38+
else
39+
echo "hash=none" >> $GITHUB_OUTPUT
40+
fi
2241
2342
- name: Cache Pods
2443
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2544
with:
26-
path: Pods
27-
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
45+
path: |
46+
ios/Pods
47+
libraries/@mattermost/intune/ios/Frameworks
48+
key: ${{ runner.os }}-pods-v3-intune-${{ inputs.intune-enabled }}-${{ steps.intune-hash.outputs.hash }}-${{ hashFiles('ios/Podfile.lock') }}
2849
restore-keys: |
29-
${{ runner.os }}-pods-
50+
${{ runner.os }}-pods-v3-intune-${{ inputs.intune-enabled }}-${{ steps.intune-hash.outputs.hash }}-
51+
${{ runner.os }}-pods-v3-intune-${{ inputs.intune-enabled }}-
52+
53+
- name: ci/install-pods-dependencies
54+
shell: bash
55+
env:
56+
INTUNE_ENABLED: ${{ inputs.intune-enabled == 'true' && '1' || '0' }}
57+
run: |
58+
echo "::group::install-pods-dependencies"
59+
echo "INTUNE_ENABLED=$INTUNE_ENABLED"
60+
npm run ios-gems
61+
npm run pod-install
62+
echo "::endgroup::"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2+
# See LICENSE.txt for license information.
3+
4+
name: Setup Intune SSH Key
5+
description: Configure SSH private key for accessing Intune submodule repository
6+
7+
inputs:
8+
ssh-private-key:
9+
description: 'SSH private key for Intune submodule repository access'
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Configure Intune submodule SSH key
16+
shell: bash
17+
run: |
18+
mkdir -p ~/.ssh
19+
chmod 700 ~/.ssh
20+
21+
# Configure Intune submodule SSH key (separate from main repo key)
22+
INTUNE_KEY_PATH="${HOME}/.ssh/intune_submodule_ed25519"
23+
echo -e '${{ inputs.ssh-private-key }}' > ${INTUNE_KEY_PATH}
24+
chmod 0600 ${INTUNE_KEY_PATH}
25+
ssh-keygen -y -f ${INTUNE_KEY_PATH} > ${INTUNE_KEY_PATH}.pub
26+
27+
echo "✅ Intune submodule SSH key configured"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2+
# See LICENSE.txt for license information.
3+
4+
name: Setup Intune
5+
description: Initialize Intune submodule and link module for internal builds with MAM features
6+
7+
inputs:
8+
ssh-private-key:
9+
description: 'SSH private key for Intune submodule repository access'
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Configure SSH for Intune submodule
16+
uses: ./.github/actions/setup-intune-ssh-key
17+
with:
18+
ssh-private-key: ${{ inputs.ssh-private-key }}
19+
20+
- name: Initialize Intune submodule
21+
shell: bash
22+
env:
23+
GIT_SSH_COMMAND: ssh -i $HOME/.ssh/intune_submodule_ed25519 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no
24+
run: |
25+
echo "::group::Initialize Intune submodule"
26+
# Check if submodule is already initialized
27+
if [ -e "libraries/@mattermost/intune/.git" ]; then
28+
echo "ℹ️ Intune submodule already initialized, updating..."
29+
git submodule update --remote libraries/@mattermost/intune
30+
else
31+
echo "📥 Initializing Intune submodule..."
32+
git submodule update --init --recursive libraries/@mattermost/intune
33+
fi
34+
35+
# Display submodule info
36+
cd libraries/@mattermost/intune
37+
echo "📦 Intune submodule initialized:"
38+
echo " Branch: $(git rev-parse --abbrev-ref HEAD)"
39+
echo " Commit: $(git rev-parse --short HEAD)"
40+
echo " Remote: $(git remote get-url origin)"
41+
cd ../..
42+
43+
echo "✅ Intune submodule ready"
44+
echo "::endgroup::"
45+
46+
- name: Link Intune module to node_modules
47+
shell: bash
48+
run: |
49+
echo "::group::Link Intune module"
50+
# Install the module without saving to package.json
51+
npm install --install-links --no-save ./libraries/@mattermost/intune
52+
53+
# Verify symlink was created
54+
if [ -L "node_modules/@mattermost/intune" ] || [ -d "node_modules/@mattermost/intune" ]; then
55+
echo "✅ Intune module linked to node_modules/@mattermost/intune"
56+
else
57+
echo "❌ Failed to link Intune module"
58+
exit 1
59+
fi
60+
echo "::endgroup::"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2+
# See LICENSE.txt for license information.
3+
4+
name: Setup SSH Key
5+
description: Configure SSH private key for accessing private repositories
6+
7+
inputs:
8+
ssh-private-key:
9+
description: 'SSH private key for repository access'
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Configure SSH private key
16+
shell: bash
17+
run: |
18+
SSH_KEY_PATH=~/.ssh/id_ed25519
19+
mkdir -p ~/.ssh
20+
echo -e '${{ inputs.ssh-private-key }}' > ${SSH_KEY_PATH}
21+
chmod 0600 ${SSH_KEY_PATH}
22+
ssh-keygen -y -f ${SSH_KEY_PATH} > ${SSH_KEY_PATH}.pub
23+
echo "✅ SSH key configured"

.github/workflows/build-ios-beta.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
env:
1212
NODE_VERSION: 22.14.0
1313
TERM: xterm
14+
INTUNE_ENABLED: 1
1415

1516
jobs:
1617
test:
@@ -22,7 +23,7 @@ jobs:
2223
uses: ./.github/actions/test
2324

2425
build-ios-simulator:
25-
runs-on: macos-14-large
26+
runs-on: macos-15-large
2627
if: ${{ !contains(github.ref_name, 'beta-ios') }}
2728
needs:
2829
- test
@@ -32,6 +33,9 @@ jobs:
3233

3334
- name: ci/prepare-ios-build
3435
uses: ./.github/actions/prepare-ios-build
36+
with:
37+
intune-enabled: 'true'
38+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
3539

3640
- name: ci/build-ios-simulator
3741
env:
@@ -50,25 +54,24 @@ jobs:
5054
path: Mattermost-simulator-x86_64.app.zip
5155

5256
build-and-deploy-ios-beta:
53-
runs-on: macos-14-large
57+
runs-on: macos-15-large
5458
if: ${{ !contains(github.ref_name, 'beta-sim') }}
5559
needs:
5660
- test
5761
steps:
5862
- name: ci/checkout-repo
5963
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6064

61-
- name: ci/output-ssh-private-key
62-
shell: bash
63-
run: |
64-
SSH_KEY_PATH=~/.ssh/id_ed25519
65-
mkdir -p ~/.ssh
66-
echo -e '${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}' > ${SSH_KEY_PATH}
67-
chmod 0600 ${SSH_KEY_PATH}
68-
ssh-keygen -y -f ${SSH_KEY_PATH} > ${SSH_KEY_PATH}.pub
65+
- name: ci/setup-ssh-key
66+
uses: ./.github/actions/setup-ssh-key
67+
with:
68+
ssh-private-key: ${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}
6969

7070
- name: ci/prepare-ios-build
7171
uses: ./.github/actions/prepare-ios-build
72+
with:
73+
intune-enabled: 'true'
74+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
7275

7376
- name: ci/build-and-deploy-ios-beta
7477
env:

.github/workflows/build-ios-release.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
env:
1212
NODE_VERSION: 22.14.0
1313
TERM: xterm
14+
INTUNE_ENABLED: 1
1415

1516
jobs:
1617
test:
@@ -22,25 +23,24 @@ jobs:
2223
uses: ./.github/actions/test
2324

2425
build-and-deploy-ios-release:
25-
runs-on: macos-14-large
26+
runs-on: macos-15-large
2627
if: ${{ !contains(github.ref_name, 'release-sim') }}
2728
needs:
2829
- test
2930
steps:
3031
- name: ci/checkout-repo
3132
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3233

34+
- name: ci/setup-ssh-key
35+
uses: ./.github/actions/setup-ssh-key
36+
with:
37+
ssh-private-key: ${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}
38+
3339
- name: ci/prepare-ios-build
3440
uses: ./.github/actions/prepare-ios-build
35-
36-
- name: ci/output-ssh-private-key
37-
shell: bash
38-
run: |
39-
SSH_KEY_PATH=~/.ssh/id_ed25519
40-
mkdir -p ~/.ssh
41-
echo -e '${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}' > ${SSH_KEY_PATH}
42-
chmod 0600 ${SSH_KEY_PATH}
43-
ssh-keygen -y -f ${SSH_KEY_PATH} > ${SSH_KEY_PATH}.pub
41+
with:
42+
intune-enabled: 'true'
43+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
4444

4545
- name: ci/build-and-deploy-ios-release
4646
env:
@@ -71,7 +71,7 @@ jobs:
7171
path: "*.ipa"
7272

7373
build-ios-simulator:
74-
runs-on: macos-14-large
74+
runs-on: macos-15-large
7575
if: ${{ !contains(github.ref_name , 'release-ios') }}
7676
needs:
7777
- test
@@ -81,6 +81,9 @@ jobs:
8181

8282
- name: ci/prepare-ios-build
8383
uses: ./.github/actions/prepare-ios-build
84+
with:
85+
intune-enabled: 'true'
86+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
8487

8588
- name: ci/build-ios-simulator
8689
env:

.github/workflows/build-pr.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
env:
99
NODE_VERSION: 22.14.0
1010
TERM: xterm
11+
INTUNE_ENABLED: 1
1112

1213
jobs:
1314
test:
@@ -22,7 +23,7 @@ jobs:
2223
uses: ./.github/actions/test
2324

2425
build-ios-pr:
25-
runs-on: macos-14-large
26+
runs-on: macos-15-large
2627
if: ${{ github.event.label.name == 'Build Apps for PR' || github.event.label.name == 'Build App for iOS' }}
2728
needs:
2829
- test
@@ -32,17 +33,16 @@ jobs:
3233
with:
3334
ref: ${{ github.event.pull_request.head.sha }}
3435

36+
- name: ci/setup-ssh-key
37+
uses: ./.github/actions/setup-ssh-key
38+
with:
39+
ssh-private-key: ${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}
40+
3541
- name: ci/prepare-ios-build
3642
uses: ./.github/actions/prepare-ios-build
37-
38-
- name: ci/output-ssh-private-key
39-
shell: bash
40-
run: |
41-
SSH_KEY_PATH=~/.ssh/id_ed25519
42-
mkdir -p ~/.ssh
43-
echo -e '${{ secrets.MM_MOBILE_PRIVATE_DEPLOY_KEY }}' > ${SSH_KEY_PATH}
44-
chmod 0600 ${SSH_KEY_PATH}
45-
ssh-keygen -y -f ${SSH_KEY_PATH} > ${SSH_KEY_PATH}.pub
43+
with:
44+
intune-enabled: 'true'
45+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
4646

4747
- name: ci/build-ios-pr
4848
env:

.github/workflows/e2e-detox-pr.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: "${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.label.name }}"
1515
cancel-in-progress: true
1616

17+
env:
18+
INTUNE_ENABLED: 1
19+
1720
jobs:
1821
update-initial-status-ios:
1922
if: contains(github.event.label.name, 'E2E iOS tests for PR')
@@ -46,7 +49,7 @@ jobs:
4649

4750
build-ios-simulator:
4851
if: contains(github.event.label.name, 'E2E iOS tests for PR')
49-
runs-on: macos-14
52+
runs-on: macos-15
5053
needs:
5154
- update-initial-status-ios
5255
steps:
@@ -55,6 +58,9 @@ jobs:
5558

5659
- name: Prepare iOS Build
5760
uses: ./.github/actions/prepare-ios-build
61+
with:
62+
intune-enabled: 'true'
63+
intune-ssh-private-key: ${{ secrets.MM_MOBILE_INTUNE_DEPLOY_KEY }}
5864

5965
- name: Build iOS Simulator
6066
env:

0 commit comments

Comments
 (0)