Skip to content

Commit 5931fd1

Browse files
Add Github Actions Workflows
1 parent 0c135b7 commit 5931fd1

File tree

6 files changed

+239
-0
lines changed

6 files changed

+239
-0
lines changed

.github/workflows/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
gha_build-ios_env.sh
2+
gha_eclipsesource_match-certificates
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build 2.x iOS app
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '15 5 * * *'
7+
repository_dispatch:
8+
types:
9+
- build-2.x-nightly-ios
10+
11+
jobs:
12+
build-ios:
13+
runs-on: macos-latest
14+
name: Build Tabris.js Hello World iOS
15+
steps:
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
ref: 2.x-nightly
21+
path: tabris-js-hello-world
22+
fetch-depth: 1
23+
24+
- name: Decrypt secrets
25+
env:
26+
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
27+
run: |
28+
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
29+
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
30+
31+
- name: Prepare keychain
32+
env:
33+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
34+
run: |
35+
source gha_build-ios_env.sh
36+
37+
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
38+
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
39+
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
40+
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
41+
42+
mkdir -p ~/.ssh
43+
ssh-keyscan github.com >> ~/.ssh/known_hosts
44+
45+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
46+
chmod 0600 gha_eclipsesource_match-certificates
47+
ssh-add gha_eclipsesource_match-certificates
48+
49+
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
50+
51+
ssh-add -D
52+
rm gha_eclipsesource_match-certificates
53+
54+
- name: Install tabris-cli
55+
run: npm install -g tabris-cli
56+
57+
- name: Build tabris-js-hello-world
58+
env:
59+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
60+
run: |
61+
cd tabris-js-hello-world
62+
npm install
63+
source ../gha_build-ios_env.sh
64+
export BUILD_NUMBER="$(date +%y%m%d%H%M)"
65+
echo BUILD_NUMBER $BUILD_NUMBER
66+
tabris build ios --release --device --verbose
67+
68+
- name: AppStore Upload
69+
run: |
70+
source gha_build-ios_env.sh
71+
xcrun altool --upload-app --type ios \
72+
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
73+
--username $FASTLANE_USER \
74+
--password '@env:FASTLANE_PASSWORD'
75+
rm gha_build-ios_env.sh
76+
77+
- name: Cleanup
78+
if: always()
79+
run: rm -Rf *
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build 3.x iOS app
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '15 5 * * *'
7+
repository_dispatch:
8+
types:
9+
- build-3.x-nightly-ios
10+
11+
jobs:
12+
build-ios:
13+
runs-on: macos-latest
14+
name: Build Tabris.js Hello World iOS
15+
steps:
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
ref: 3.x-nightly
21+
path: tabris-js-hello-world
22+
fetch-depth: 1
23+
24+
- name: Decrypt secrets
25+
env:
26+
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
27+
run: |
28+
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
29+
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
30+
31+
- name: Prepare keychain
32+
env:
33+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
34+
run: |
35+
source gha_build-ios_env.sh
36+
37+
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
38+
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
39+
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
40+
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
41+
42+
mkdir -p ~/.ssh
43+
ssh-keyscan github.com >> ~/.ssh/known_hosts
44+
45+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
46+
chmod 0600 gha_eclipsesource_match-certificates
47+
ssh-add gha_eclipsesource_match-certificates
48+
49+
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
50+
51+
ssh-add -D
52+
rm gha_eclipsesource_match-certificates
53+
54+
- name: Install tabris-cli
55+
run: npm install -g tabris-cli
56+
57+
- name: Build tabris-js-hello-world
58+
env:
59+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
60+
run: |
61+
cd tabris-js-hello-world
62+
npm install
63+
source ../gha_build-ios_env.sh
64+
export BUILD_NUMBER="$(date +%y%m%d%H%M)"
65+
echo BUILD_NUMBER $BUILD_NUMBER
66+
tabris build ios --release --device --verbose
67+
68+
- name: AppStore Upload
69+
run: |
70+
source gha_build-ios_env.sh
71+
xcrun altool --upload-app --type ios \
72+
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
73+
--username $FASTLANE_USER \
74+
--password '@env:FASTLANE_PASSWORD'
75+
rm gha_build-ios_env.sh
76+
77+
- name: Cleanup
78+
if: always()
79+
run: rm -Rf *
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build master iOS app
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '15 5 * * *'
7+
repository_dispatch:
8+
types:
9+
- build-master-ios
10+
11+
jobs:
12+
build-ios:
13+
runs-on: macos-latest
14+
name: Build Tabris.js Hello World iOS
15+
steps:
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
ref: master
21+
path: tabris-js-hello-world
22+
fetch-depth: 1
23+
24+
- name: Decrypt secrets
25+
env:
26+
OPENSSL_PASSPHRASE: ${{ secrets.ENCRYPTION_KEY }}
27+
run: |
28+
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
29+
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
30+
31+
- name: Prepare keychain
32+
env:
33+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
34+
run: |
35+
source gha_build-ios_env.sh
36+
37+
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
38+
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
39+
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
40+
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
41+
42+
mkdir -p ~/.ssh
43+
ssh-keyscan github.com >> ~/.ssh/known_hosts
44+
45+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
46+
chmod 0600 gha_eclipsesource_match-certificates
47+
ssh-add gha_eclipsesource_match-certificates
48+
49+
fastlane match appstore --readonly --app_identifier com.eclipsesource.hello.world
50+
51+
ssh-add -D
52+
rm gha_eclipsesource_match-certificates
53+
54+
- name: Install tabris-cli
55+
run: npm install -g tabris-cli
56+
57+
- name: Build tabris-js-hello-world
58+
env:
59+
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_BUILD_KEY }}
60+
run: |
61+
cd tabris-js-hello-world
62+
npm install
63+
source ../gha_build-ios_env.sh
64+
export BUILD_NUMBER="$(date +%y%m%d%H%M)"
65+
echo BUILD_NUMBER $BUILD_NUMBER
66+
tabris build ios --release --device --verbose
67+
68+
- name: AppStore Upload
69+
run: |
70+
source gha_build-ios_env.sh
71+
xcrun altool --upload-app --type ios \
72+
--file tabris-js-hello-world/build/cordova/platforms/ios/build/device/*.ipa \
73+
--username $FASTLANE_USER \
74+
--password '@env:FASTLANE_PASSWORD'
75+
rm gha_build-ios_env.sh
76+
77+
- name: Cleanup
78+
if: always()
79+
run: rm -Rf *
512 Bytes
Binary file not shown.
3.33 KB
Binary file not shown.

0 commit comments

Comments
 (0)