Skip to content

Merge pull request #1337 from Tonomy-Foundation/development #22

Merge pull request #1337 from Tonomy-Foundation/development

Merge pull request #1337 from Tonomy-Foundation/development #22

Workflow file for this run

name: Deployment
on:
push:
branches:
- master
- testnet
- development
jobs:
deploy:
runs-on: ubuntu-20.04
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
# https://expo.dev/accounts/[account]/settings/access-tokens
GOOGLE_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
# https://github.com/expo/fyi/blob/main/creating-google-service-account.md
APPLE_STORE_CONNECT_API_KEY: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }}
# https://github.com/expo/fyi/blob/main/creating-asc-api-key.md
GITHUB_TOKEN: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
with:
token: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic
- name: Enable Corepack before setting up Node
run: corepack enable
- name: 🚀 Build and publish staging app
uses: actions/setup-node@v4
with:
node-version: 22.3.0
- run: npm install -g eas-cli@12.6.2
- run: node -v && npm -v && yarn -v && eas -v
- run: echo "${GOOGLE_SERVICE_ACCOUNT_KEY}" > ./google-service-key.json
- run: echo "${APPLE_STORE_CONNECT_API_KEY}" > ./apple-asc-api-key.p8
- run: yarn --immutable
- run: yarn release
- run: |
if [[ ${GITHUB_REF#refs/*/} == "master" ]]; then
echo "Branch is 'master'"
yarn run deploy:production
fi
if [[ ${GITHUB_REF#refs/*/} == "testnet" ]]; then
echo "Branch is 'testnet'"
yarn run deploy:testnet
fi
if [[ ${GITHUB_REF#refs/*/} == "development" ]]; then
echo "Branch is 'development'"
yarn run deploy:staging
fi
env:
GITHUB_TOKEN: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}