feat: ⚡ changed parseFloat to decimal #1471
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Android APK | |
# Use https://github.com/nektos/act to run this locally | |
# INSTALL: | |
# curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash | |
# PREPARE: you need to have a `testnet` project in EAS: | |
# export EXPO_NODE_ENV=testnet | |
# export EXPO_FIRST_TIME=true | |
# yarn run build:android | |
# echo "Set the value of `expoProjectId` in src/config/config.testnet.json" | |
# echo "Get an access token from https://expo.dev/accounts/[account]/settings/access-tokens" | |
# export EXPO_TOKEN=rtsB... | |
# RUN: | |
# act -j build-android -s EXPO_TOKEN="${EXPO_TOKEN}" | |
on: | |
push | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
env: | |
EXPO_NODE_ENV: testnet | |
EXPO_PLATFORM: android | |
NODE_VERSION: 22.3.0 | |
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | |
# https://expo.dev/accounts/[account]/settings/access-tokens | |
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }} | |
# https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/ | |
SENTRY_SECRET_KEY : ${{ secrets.SENTRY_SECRET_KEY }} | |
# https://sentry.io/orgredirect/organizations/:orgslug/projects/:projectslug/settings/keys/ | |
container: | |
image: cimg/android:2024.01-ndk | |
# See https://circleci.com/developer/images/image/cimg/android#image-tags | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install nodejs | |
run: | | |
wget "nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" | |
sudo tar -C /usr/local --strip-components 1 -xzf "node-v${NODE_VERSION}-linux-x64.tar.gz" | |
sudo corepack enable | |
node -v && npm -v && yarn -v | |
rm "node-v${NODE_VERSION}-linux-x64.tar.gz" | |
# Clears about 3.2Gb | |
# Images: | |
# - node:16/18/20(-alpine) | |
# - moby/buildkit:latest | |
# - alpine:3.16/3.17/3.18/3.19 | |
# - debian:10/11 | |
# - ubuntu:20.04/22.04 | |
- name: Clean up Docker images | |
run: | | |
echo "Docker before cleanup:" | |
sudo docker ps | |
sudo docker images | |
sudo docker system df | |
sudo docker system prune -af | |
echo "Docker after cleanup:" | |
sudo docker ps | |
sudo docker images | |
sudo docker system df | |
- name: Install dependancies | |
run: yarn --immutable | |
# Clears about 0.5Gb | |
- name: Clear yarn cache | |
run: | | |
sudo du -sh ~/.yarn | |
yarn cache clean | |
sudo du -sh ~/.yarn | |
- name: Install eas globally | |
run: sudo npm install -g eas-cli@12.6.2 | |
- name: 🚀 Build Android .apk app | |
run: | | |
yarn run build:prepare | |
npx eas build --clear-cache --profile "${{env.EXPO_NODE_ENV}}-internal" --platform "${EXPO_PLATFORM}" --local | |
env: | |
SENTRY_SECRET_KEY: ${{ secrets.SENTRY_SECRET_KEY }} | |
- name: Find APK file and rename it so it can be added as an artifact | |
run: find . -name "*.apk" -exec mv {} "Tonomy-ID-${{env.EXPO_NODE_ENV}}.apk" \; | |
- name: Archive Android APK as artifact | |
# Do not run this step if the action is being run locally (using nektos/act) | |
if: ${{ github.actor != 'nektos/act' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "TonomyID-Android-${{env.EXPO_NODE_ENV}}" | |
path: "./Tonomy-ID-${{env.EXPO_NODE_ENV}}.apk" |