Skip to content

Commit fd39e2a

Browse files
Checkout match repo wtih Github Action
1 parent 480ee9c commit fd39e2a

File tree

3 files changed

+79
-82
lines changed

3 files changed

+79
-82
lines changed

.github/workflows/build-2.x-nightly-ios-app.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
build-ios:
1313
runs-on: macos-latest
1414
name: Build Tabris.js Hello World iOS
15+
environment: 'iOS app build'
1516
strategy:
1617
matrix:
1718
build_type: [release, debug]
@@ -24,64 +25,62 @@ jobs:
2425
path: tabris-js-hello-world
2526
fetch-depth: 1
2627

27-
- name: Decrypt secrets
28-
env:
29-
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
30-
run: |
31-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_eclipsesource_match-certificates.enc -out gha_eclipsesource_match-certificates -pass pass:$OPENSSL_PASSPHRASE -d -md md5
32-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_build-ios_env.sh.enc -out gha_build-ios_env.sh -pass pass:$OPENSSL_PASSPHRASE -d -md md5
28+
- name: Checkout match-certificates
29+
uses: actions/checkout@v2
30+
with:
31+
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
32+
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
33+
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
34+
path: match
35+
fetch-depth: 1
3336

3437
- name: Prepare keychain
3538
env:
36-
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
39+
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
40+
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.*'
41+
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
42+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
43+
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
44+
MATCH_GIT_URL: ./match
45+
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
46+
MATCH_KEYCHAIN_NAME: 'build.keychain'
47+
MATCH_KEYCHAIN_PASSWORD: 'foobar'
3748
run: |
38-
source gha_build-ios_env.sh
39-
4049
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4150
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4251
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
4352
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
4453
45-
mkdir -p ~/.ssh
46-
ssh-keyscan github.com >> ~/.ssh/known_hosts
47-
48-
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
49-
chmod 0600 gha_eclipsesource_match-certificates
50-
ssh-add gha_eclipsesource_match-certificates
51-
5254
if [[ "${{ matrix.build_type }}" == "release" ]]; then
53-
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
55+
fastlane match appstore --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
5456
else
55-
fastlane match development --readonly --app_identifier com.eclipsesource.*
57+
fastlane match development --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
5658
fi
5759
58-
ssh-add -D
59-
rm gha_eclipsesource_match-certificates
60-
6160
- name: Install tabris-cli
6261
run: npm install -g tabris-cli
6362

6463
- name: Build tabris-js-hello-world
6564
env:
66-
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
65+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_IOS_BUILD_KEY }}
6766
run: |
6867
cd tabris-js-hello-world
6968
npm install
70-
source ../gha_build-ios_env.sh
7169
export BUILD_NUMBER="$(date +%y%m%d%H%M).2"
7270
echo BUILD_NUMBER $BUILD_NUMBER
7371
7472
tabris build ios --${{ matrix.build_type }} --device --verbose
7573
7674
- name: AppStore Upload
7775
if: ${{ matrix.build_type == 'release' }}
76+
env:
77+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
78+
FASTLANE_APP_SPECIFIC_PASSWORD: ${{ secrets.TABRIS_IOS_FASTLANE_APP_SPECIFIC_PASSWORD }}
7879
run: |
79-
source gha_build-ios_env.sh
8080
xcrun altool --upload-app --type ios \
81-
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
81+
--file "$(find . -iname "*.ipa")" \
8282
--username $FASTLANE_USER \
83-
--password '@env:FASTLANE_PASSWORD'
84-
rm gha_build-ios_env.sh
83+
--password '@env:FASTLANE_APP_SPECIFIC_PASSWORD'
8584
8685
- name: Cleanup
8786
if: always()

.github/workflows/build-3.x-nightly-ios-app.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
build-ios:
1313
runs-on: macos-latest
1414
name: Build Tabris.js Hello World iOS
15+
environment: 'iOS app build'
1516
strategy:
1617
matrix:
1718
build_type: [release, debug]
@@ -24,64 +25,62 @@ jobs:
2425
path: tabris-js-hello-world
2526
fetch-depth: 1
2627

27-
- name: Decrypt secrets
28-
env:
29-
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
30-
run: |
31-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_eclipsesource_match-certificates.enc -out gha_eclipsesource_match-certificates -pass pass:$OPENSSL_PASSPHRASE -d -md md5
32-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_build-ios_env.sh.enc -out gha_build-ios_env.sh -pass pass:$OPENSSL_PASSPHRASE -d -md md5
28+
- name: Checkout match-certificates
29+
uses: actions/checkout@v2
30+
with:
31+
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
32+
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
33+
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
34+
path: match
35+
fetch-depth: 1
3336

3437
- name: Prepare keychain
3538
env:
36-
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
39+
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
40+
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.*'
41+
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
42+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
43+
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
44+
MATCH_GIT_URL: ./match
45+
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
46+
MATCH_KEYCHAIN_NAME: 'build.keychain'
47+
MATCH_KEYCHAIN_PASSWORD: 'foobar'
3748
run: |
38-
source gha_build-ios_env.sh
39-
4049
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4150
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4251
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
4352
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
4453
45-
mkdir -p ~/.ssh
46-
ssh-keyscan github.com >> ~/.ssh/known_hosts
47-
48-
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
49-
chmod 0600 gha_eclipsesource_match-certificates
50-
ssh-add gha_eclipsesource_match-certificates
51-
5254
if [[ "${{ matrix.build_type }}" == "release" ]]; then
53-
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
55+
fastlane match appstore --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
5456
else
55-
fastlane match development --readonly --app_identifier com.eclipsesource.*
57+
fastlane match development --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
5658
fi
5759
58-
ssh-add -D
59-
rm gha_eclipsesource_match-certificates
60-
6160
- name: Install tabris-cli
6261
run: npm install -g tabris-cli
6362

6463
- name: Build tabris-js-hello-world
6564
env:
66-
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
65+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_IOS_BUILD_KEY }}
6766
run: |
6867
cd tabris-js-hello-world
6968
npm install
70-
source ../gha_build-ios_env.sh
7169
export BUILD_NUMBER="$(date +%y%m%d%H%M).3"
7270
echo BUILD_NUMBER $BUILD_NUMBER
7371
7472
tabris build ios --${{ matrix.build_type }} --device --verbose
7573
7674
- name: AppStore Upload
7775
if: ${{ matrix.build_type == 'release' }}
76+
env:
77+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
78+
FASTLANE_APP_SPECIFIC_PASSWORD: ${{ secrets.TABRIS_IOS_FASTLANE_APP_SPECIFIC_PASSWORD }}
7879
run: |
79-
source gha_build-ios_env.sh
8080
xcrun altool --upload-app --type ios \
81-
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
81+
--file "$(find . -iname "*.ipa")" \
8282
--username $FASTLANE_USER \
83-
--password '@env:FASTLANE_PASSWORD'
84-
rm gha_build-ios_env.sh
83+
--password '@env:FASTLANE_APP_SPECIFIC_PASSWORD'
8584
8685
- name: Cleanup
8786
if: always()

.github/workflows/build-master-ios-app.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
build-ios:
1313
runs-on: macos-latest
1414
name: Build Tabris.js Hello World iOS
15+
environment: 'iOS app build'
1516
strategy:
1617
matrix:
1718
build_type: [release, debug]
@@ -24,64 +25,62 @@ jobs:
2425
path: tabris-js-hello-world
2526
fetch-depth: 1
2627

27-
- name: Decrypt secrets
28-
env:
29-
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
30-
run: |
31-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_eclipsesource_match-certificates.enc -out gha_eclipsesource_match-certificates -pass pass:$OPENSSL_PASSPHRASE -d -md md5
32-
openssl aes-256-cbc -in tabris-js-hello-world/.github/workflows/ios/gha_build-ios_env.sh.enc -out gha_build-ios_env.sh -pass pass:$OPENSSL_PASSPHRASE -d -md md5
28+
- name: Checkout match-certificates
29+
uses: actions/checkout@v2
30+
with:
31+
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
32+
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
33+
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
34+
path: match
35+
fetch-depth: 1
3336

3437
- name: Prepare keychain
3538
env:
36-
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
39+
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
40+
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.*'
41+
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
42+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
43+
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
44+
MATCH_GIT_URL: ./match
45+
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
46+
MATCH_KEYCHAIN_NAME: 'build.keychain'
47+
MATCH_KEYCHAIN_PASSWORD: 'foobar'
3748
run: |
38-
source gha_build-ios_env.sh
39-
4049
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4150
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
4251
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
4352
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
4453
45-
mkdir -p ~/.ssh
46-
ssh-keyscan github.com >> ~/.ssh/known_hosts
47-
48-
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
49-
chmod 0600 gha_eclipsesource_match-certificates
50-
ssh-add gha_eclipsesource_match-certificates
51-
5254
if [[ "${{ matrix.build_type }}" == "release" ]]; then
53-
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
55+
fastlane match appstore --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
5456
else
55-
fastlane match development --readonly --app_identifier com.eclipsesource.*
57+
fastlane match development --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
5658
fi
5759
58-
ssh-add -D
59-
rm gha_eclipsesource_match-certificates
60-
6160
- name: Install tabris-cli
6261
run: npm install -g tabris-cli
6362

6463
- name: Build tabris-js-hello-world
6564
env:
66-
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
65+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_IOS_BUILD_KEY }}
6766
run: |
6867
cd tabris-js-hello-world
6968
npm install
70-
source ../gha_build-ios_env.sh
71-
export BUILD_NUMBER="$(date +%y%m%d%H%M).0"
69+
export BUILD_NUMBER="$(date +%y%m%d%H%M)"
7270
echo BUILD_NUMBER $BUILD_NUMBER
7371
7472
tabris build ios --${{ matrix.build_type }} --device --verbose
7573
7674
- name: AppStore Upload
7775
if: ${{ matrix.build_type == 'release' }}
76+
env:
77+
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
78+
FASTLANE_APP_SPECIFIC_PASSWORD: ${{ secrets.TABRIS_IOS_FASTLANE_APP_SPECIFIC_PASSWORD }}
7879
run: |
79-
source gha_build-ios_env.sh
8080
xcrun altool --upload-app --type ios \
81-
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
81+
--file "$(find . -iname "*.ipa")" \
8282
--username $FASTLANE_USER \
83-
--password '@env:FASTLANE_PASSWORD'
84-
rm gha_build-ios_env.sh
83+
--password '@env:FASTLANE_APP_SPECIFIC_PASSWORD'
8584
8685
- name: Cleanup
8786
if: always()

0 commit comments

Comments
 (0)