Skip to content

change match password #867

change match password

change match password #867

Workflow file for this run

on:
push:
branches:
- master
workflow_dispatch:
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD_NOVI }} # MATCH_PASSWORD
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
KEYCHAIN_TOKEN: ${{ secrets.KEYCHAIN_TOKEN }}
APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
APPSTORE_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
name: Beta build & deploy
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Create version tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
BUILD=$(git rev-list --count $GITHUB_SHA)
VERSION=$(node -e "p=require('./package.json');console.log(p.version)")
TAG_NAME="v${VERSION}.${BUILD}"
curl --request POST \
--url https://api.github.com/repos/moonlet/wallet-app/git/refs \
--header "authorization: token $GITHUB_TOKEN" \
--header "content-type: application/json" \
--data "{\"ref\": \"refs/tags/$TAG_NAME\",\"sha\": \"$GITHUB_SHA\"}"
- name: Cache node modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock', 'package.json') }}
- name: Yarn install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Generate icons
run: yarn run generate-icons
- name: Generate firebase web config file
run: |
echo '${{ secrets.FB_CONFIG_WEB_BETA }}' > src/config/firebase-web-beta.ts
echo '${{ secrets.FB_CONFIG_WEB_DEPLOY }}' > src/config/firebase-web-release.ts
- name: Run unit tests
run: yarn test
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |-
curl -s https://codecov.io/bash | bash -s -- \
-F "unittests" \
-Z || echo 'Codecov upload failed'
- name: Sentry release setup
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: moonlet
run: |-
BUILD=$(git rev-list --count $GITHUB_SHA)
VERSION=$(node -e "p=require('./package.json');console.log(p.version)")
npx sentry-cli releases new "com.moonlet.beta@$VERSION+$BUILD" -p wallet-app-android -p wallet-app-ios -p wallet-extension -p beta-app-android -p beta-app-ios -p beta-extension
npx sentry-cli releases set-commits "com.moonlet.beta@$VERSION+$BUILD" --auto
beta-android:
name: Android app
runs-on: ubuntu-latest
# needs: unit-tests
steps:
- name: Install Java 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: adopt
architecture: x64
- name: Increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Checkout
uses: actions/checkout@v1
- name: Setup nodejs
uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- name: Generate firebase config file
run: |
echo '${{ secrets.FB_CONFIG_ANDROID_BETA }}' > android/app/google-services.json
echo '${{ secrets.FB_CONFIG_WEB_BETA }}' > src/config/firebase-web-beta.ts
echo '${{ secrets.FB_CONFIG_WEB_DEPLOY }}' > src/config/firebase-web-release.ts
- name: Setup key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_CERTS }}
- name: Add to host
run: ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
- name: Dependencies install
run: cd android && bundle install
- name: Cache node modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock', 'package.json') }}
# key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Yarn install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Get sign ssh-keys
run: cd android/app && git clone [email protected]:moonlet/moonlet-playstore-key.git
- name: Generate fonts and icons
run: yarn run generate-icons
- name: Run fastlane beta
run: cd android/fastlane && bundle exec fastlane beta
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
NODE_OPTIONS: --max_old_space_size=4096
NODE_ENV: production
beta-ios:
name: iOS app
# runs-on: macos-latest
runs-on: macos-11
# needs: unit-tests
steps:
- name: Setup xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Setup key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_CERTS }}
- name: Add to host
run: ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
- name: Generate firebase config file
run: |
echo '${{ secrets.FB_CONFIG_IOS_BETA }}' > ios/GoogleService-Info.plist
echo '${{ secrets.FB_CONFIG_WEB_BETA }}' > src/config/firebase-web-beta.ts
echo '${{ secrets.FB_CONFIG_WEB_DEPLOY }}' > src/config/firebase-web-release.ts
- name: Generate p8 File
run: |
echo '${{ secrets.APPSTORE_CONNECT_FILE_KEY }}' > ios/AuthKey.p8
- name: Dependencies install
run: cd ios && bundle install
- name: Cache node modules
uses: actions/cache@v2
id: cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock', 'package.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Cocoapods install
run: cd ios && pod install
- name: Generate fonts and icons
run: yarn run generate-icons
- name: Run fastlane beta
run: cd ios/fastlane && bundle exec fastlane beta
env:
NODE_ENV: production