PR workflow
This commit is contained in:
parent
ede7a752c4
commit
192bfbe7aa
5 changed files with 205 additions and 38 deletions
139
.github/workflows/validate_pullrequest.yml
vendored
Normal file
139
.github/workflows/validate_pullrequest.yml
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
name: Validate Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
- name: node_modules cache
|
||||
uses: actions/cache@v3
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-npm-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
- name: Run Tests
|
||||
run: npm run test
|
||||
|
||||
build-android:
|
||||
needs: run-tests
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
- name: node_modules cache
|
||||
uses: actions/cache@v3
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-npm-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Set up Ruby & Fastlane
|
||||
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
||||
with:
|
||||
ruby-version: '3.2.1'
|
||||
bundler-cache: true
|
||||
working-directory: ./android
|
||||
|
||||
- name: Restore Release Keystore
|
||||
env:
|
||||
keystore_base64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
echo "$keystore_base64" | base64 --decode > release.keystore
|
||||
echo "CI_EVALUATION_KEYSTORE_FILE=`pwd`/release.keystore" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Release APK
|
||||
env:
|
||||
CI_EVALUATION_KEY_ALIAS: ${{ secrets.CI_EVALUATION_KEY_ALIAS }}
|
||||
CI_EVALUATION_KEY_PASSWORD: ${{ secrets.CI_EVALUATION_KEY_PASSWORD }}
|
||||
CI_EVALUATION_STORE_PASSWORD: ${{ secrets.CI_EVALUATION_STORE_PASSWORD }}
|
||||
working-directory: ./android
|
||||
run: bundle exec fastlane buildReleaseApk
|
||||
|
||||
build-ios:
|
||||
needs: run-tests
|
||||
runs-on: macos-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
- name: node_modules cache
|
||||
uses: actions/cache@v3
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-npm-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Set up Ruby & Fastlane
|
||||
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
||||
with:
|
||||
ruby-version: '3.2.1'
|
||||
bundler-cache: true
|
||||
working-directory: ./ios
|
||||
|
||||
- name: pod install cache
|
||||
uses: actions/cache@v3
|
||||
id: pod-cache
|
||||
with:
|
||||
path: ios/Pods
|
||||
key: ${{ runner.os }}-pod-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: ${{ runner.os }}-pod-
|
||||
- name: Install iOS Dependencies
|
||||
working-directory: ./ios
|
||||
run: pod install
|
||||
|
||||
- name: Restore Provisioning Profile
|
||||
env:
|
||||
ci_evaluation_provision_profile_base64: ${{ secrets.CI_EVALUATION_PROVISION_PROFILE_BASE64 }}
|
||||
run: |
|
||||
echo "$ci_evaluation_provision_profile_base64" | base64 --decode > profile.mobileprovision
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision
|
||||
echo "CI_EVALUATION_PROVISIONING_PROFILE_FILE=\"~/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision\"" >> $GITHUB_ENV
|
||||
- name: Restore iOS Cert
|
||||
env:
|
||||
ci_evaluation_cert_base64: ${{ secrets.CI_EVALUATION_CERT_BASE64 }}
|
||||
run: |
|
||||
echo "$ci_evaluation_cert_base64" | base64 --decode > ios_distribution.p12
|
||||
echo "CI_EVALUATION_IOS_CERT_FILE=`pwd`/ios_distribution.p12" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Release IPA
|
||||
env:
|
||||
CI_EVALUATION_CERTIFICATE_PASSWORD: ${{ secrets.CI_EVALUATION_CERTIFICATE_PASSWORD }}
|
||||
CI_EVALUATION_APP_IDENTIFIER: ${{ secrets.CI_EVALUATION_APP_IDENTIFIER }}
|
||||
working-directory: ./ios
|
||||
run: bundle exec fastlane buildReleaseIPA
|
||||
Loading…
Add table
Add a link
Reference in a new issue