This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
138 lines (123 loc) · 4.25 KB
/
test.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
actions: read
checks: write
contents: none
deployments: none
issues: none
packages: none
repository-projects: none
statuses: write
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: |
- recursive: true
args: [--no-frozen-lockfile, --strict-peer-dependencies]
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
check-latest: true
- name: Import iOS CodeSign Certificates
if: github.actor != 'dependabot[bot]'
uses: Apple-Actions/import-codesign-certs@v2
with:
create-keychain: true
keychain-password: ${{ steps.develop-certificate.outputs.keychain-password }}
p12-file-base64: ${{ secrets.DISTRIBUTION_CERTIFICATES_FILE_BASE64 }}
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
- name: build
if: github.actor == 'dependabot[bot]'
run: rm -rf bin node_modules && pnpm install && pnpm build && pnpm format && pnpm lint && pnpm package
- name: unit test
if: github.actor != 'dependabot[bot]'
env:
BUNDLE_ID: 'com.github.poad.*'
PROFILE_TYPE: 'IOS_APP_ADHOC'
ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
API_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
API_PRIVATE_KEY: ${{ secrets.API_PRIVATE_KEY }}
run: rm -rf bin node_modules && pnpm install && pnpm build && pnpm format && pnpm lint && pnpm package && pnpm test
test:
runs-on: macos-11
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
- name: case on memory
uses: ./
env:
ACTIONS_STEP_DEBUG: true
with:
bundle-id: 'com.github.poad.example.reactjs.native.ReactNativeAppSample'
profile-type: IOS_APP_STORE
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.API_PRIVATE_KEY }}
- name: debug
env:
PROFILES: ${{ steps.case-duration.outputs.profiles }}
run: echo ${PROFILES}
- name: prepare case file
run: |
echo "${{ secrets.API_PRIVATE_KEY }}" > $(pwd)/private-key.p8
echo "API_PRIVATE_KEY_FILE=$(pwd)/private-key.p8" >> $GITHUB_ENV
- name: case file
uses: ./
id: case-file
env:
ACTIONS_STEP_DEBUG: true
with:
bundle-id: 'com.github.poad.example.reactjs.native.ReactNativeAppSample'
profile-type: IOS_APP_STORE
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key-file: ${{ env.API_PRIVATE_KEY_FILE }}
- name: debug
env:
PROFILES: ${{ steps.case-file.outputs.profiles }}
run: echo ${PROFILES}
- name: case for duration
uses: ./
id: case-duration
env:
ACTIONS_STEP_DEBUG: true
with:
bundle-id: 'com.github.poad.example.reactjs.native.ReactNativeAppSample'
profile-type: IOS_APP_STORE
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.API_PRIVATE_KEY }}
token-duration: 600
- name: debug
env:
PROFILES: ${{ steps.case-duration.outputs.profiles }}
run: echo ${PROFILES}
configure:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Pull request auto merge enabler
if: github.event_name == 'pull_request'
uses: poad/github-pull-request-auto-merge-enable-action@v1.0.5
with:
pull_request_number: ${{ github.event.pull_request.number }}
github_token: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }}
repository: ${{ github.event.repository.name }}
owner: ${{ github.repository_owner }}
merge_method: SQUASH