Skip to content

Commit ca6ca11

Browse files
Use prepare-for-signing action in workflows
1 parent 02b400b commit ca6ca11

File tree

3 files changed

+36
-108
lines changed

3 files changed

+36
-108
lines changed

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

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,25 @@ jobs:
1818
build_type: [release, debug]
1919
steps:
2020

21-
- name: Setup Node.js
22-
uses: actions/setup-node@v1
21+
- name: Install the Apple certificate and provisioning profile
22+
uses: eclipsesource/prepare-for-signing-action@v1
2323
with:
24-
node-version: '14'
24+
app_identifier: "${{ matrix.build_type == 'release' && 'com.eclipsesource.hello.world' || 'com.eclipsesource.*' }}"
25+
profile_type: "${{ matrix.build_type == 'release' && 'appstore' || 'development' }}"
26+
match_git_url: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
27+
match_git_branch: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
28+
match_git_ssh_key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
29+
match_password: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
30+
fastlane_team_id: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
31+
fastlane_user: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
2532

2633
- name: Checkout
27-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
2835
with:
2936
ref: 2.x-nightly
3037
path: tabris-js-hello-world
3138
fetch-depth: 1
3239

33-
- name: Checkout match-certificates
34-
uses: actions/checkout@v2
35-
with:
36-
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
37-
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
38-
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
39-
path: match
40-
fetch-depth: 1
41-
42-
- name: Prepare keychain
43-
env:
44-
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
45-
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.hello.world'
46-
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
47-
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
48-
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
49-
MATCH_GIT_URL: ./match
50-
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
51-
MATCH_KEYCHAIN_NAME: 'build.keychain'
52-
MATCH_KEYCHAIN_PASSWORD: 'foobar'
53-
run: |
54-
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
55-
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
56-
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
57-
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
58-
59-
if [[ "${{ matrix.build_type }}" == "release" ]]; then
60-
fastlane match appstore --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
61-
else
62-
fastlane match development --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
63-
fi
64-
6540
- name: Install tabris-cli
6641
run: npm install -g tabris-cli
6742

@@ -71,6 +46,7 @@ jobs:
7146
run: |
7247
cd tabris-js-hello-world
7348
npm install
49+
7450
export BUILD_NUMBER="$(date +%y%m%d%H%M).2"
7551
echo BUILD_NUMBER $BUILD_NUMBER
7652

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

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,25 @@ jobs:
1818
build_type: [release, debug]
1919
steps:
2020

21-
- name: Setup Node.js
22-
uses: actions/setup-node@v1
21+
- name: Install the Apple certificate and provisioning profile
22+
uses: eclipsesource/prepare-for-signing-action@v1
2323
with:
24-
node-version: '14'
24+
app_identifier: "${{ matrix.build_type == 'release' && 'com.eclipsesource.hello.world' || 'com.eclipsesource.*' }}"
25+
profile_type: "${{ matrix.build_type == 'release' && 'appstore' || 'development' }}"
26+
match_git_url: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
27+
match_git_branch: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
28+
match_git_ssh_key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
29+
match_password: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
30+
fastlane_team_id: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
31+
fastlane_user: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
2532

2633
- name: Checkout
27-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
2835
with:
2936
ref: 3.x-nightly
3037
path: tabris-js-hello-world
3138
fetch-depth: 1
3239

33-
- name: Checkout match-certificates
34-
uses: actions/checkout@v2
35-
with:
36-
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
37-
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
38-
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
39-
path: match
40-
fetch-depth: 1
41-
42-
- name: Prepare keychain
43-
env:
44-
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
45-
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.hello.world'
46-
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
47-
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
48-
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
49-
MATCH_GIT_URL: ./match
50-
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
51-
MATCH_KEYCHAIN_NAME: 'build.keychain'
52-
MATCH_KEYCHAIN_PASSWORD: 'foobar'
53-
run: |
54-
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
55-
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
56-
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
57-
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
58-
59-
if [[ "${{ matrix.build_type }}" == "release" ]]; then
60-
fastlane match appstore --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
61-
else
62-
fastlane match development --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
63-
fi
64-
6540
- name: Install tabris-cli
6641
run: npm install -g tabris-cli
6742

@@ -71,6 +46,7 @@ jobs:
7146
run: |
7247
cd tabris-js-hello-world
7348
npm install
49+
7450
export BUILD_NUMBER="$(date +%y%m%d%H%M).3"
7551
echo BUILD_NUMBER $BUILD_NUMBER
7652

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

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,25 @@ jobs:
1818
build_type: [release, debug]
1919
steps:
2020

21-
- name: Setup Node.js
22-
uses: actions/setup-node@v1
21+
- name: Install the Apple certificate and provisioning profile
22+
uses: eclipsesource/prepare-for-signing-action@v1
2323
with:
24-
node-version: '14'
24+
app_identifier: "${{ matrix.build_type == 'release' && 'com.eclipsesource.hello.world' || 'com.eclipsesource.*' }}"
25+
profile_type: "${{ matrix.build_type == 'release' && 'appstore' || 'development' }}"
26+
match_git_url: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
27+
match_git_branch: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
28+
match_git_ssh_key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
29+
match_password: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
30+
fastlane_team_id: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
31+
fastlane_user: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
2532

2633
- name: Checkout
27-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
2835
with:
2936
ref: master
3037
path: tabris-js-hello-world
3138
fetch-depth: 1
3239

33-
- name: Checkout match-certificates
34-
uses: actions/checkout@v2
35-
with:
36-
repository: ${{ secrets.TABRIS_IOS_MATCH_GIT_URL }}
37-
ref: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
38-
ssh-key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
39-
path: match
40-
fetch-depth: 1
41-
42-
- name: Prepare keychain
43-
env:
44-
DEBUG_APP_IDENTIFIER: 'com.eclipsesource.*'
45-
RELEASE_APP_IDENTIFIER: 'com.eclipsesource.hello.world'
46-
FASTLANE_TEAM_ID: ${{ secrets.TABRIS_IOS_FASTLANE_TEAM_ID }}
47-
FASTLANE_USER: ${{ secrets.TABRIS_IOS_FASTLANE_USER }}
48-
MATCH_PASSWORD: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
49-
MATCH_GIT_URL: ./match
50-
MATCH_GIT_BRANCH: ${{ secrets.TABRIS_IOS_MATCH_GIT_BRANCH }}
51-
MATCH_KEYCHAIN_NAME: 'build.keychain'
52-
MATCH_KEYCHAIN_PASSWORD: 'foobar'
53-
run: |
54-
security create-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
55-
security unlock-keychain -p $MATCH_KEYCHAIN_PASSWORD $MATCH_KEYCHAIN_NAME
56-
security set-keychain-settings -u -t 3600 $MATCH_KEYCHAIN_NAME
57-
security list-keychains -d user -s $MATCH_KEYCHAIN_NAME
58-
59-
if [[ "${{ matrix.build_type }}" == "release" ]]; then
60-
fastlane match appstore --readonly --app_identifier ${{ env.RELEASE_APP_IDENTIFIER }}
61-
else
62-
fastlane match development --readonly --app_identifier ${{ env.DEBUG_APP_IDENTIFIER }}
63-
fi
64-
6540
- name: Install tabris-cli
6641
run: npm install -g tabris-cli
6742

@@ -71,6 +46,7 @@ jobs:
7146
run: |
7247
cd tabris-js-hello-world
7348
npm install
49+
7450
export BUILD_NUMBER="$(date +%y%m%d%H%M)"
7551
echo BUILD_NUMBER $BUILD_NUMBER
7652

0 commit comments

Comments
 (0)