stages: - build - test - staging - prod build-android: stage: build image: walljm/gradle_android:8.0.2-jdk17-33-node1 before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - node -v - npm -v - npm ci - npm run-script build - npm run-script copy - cd android/ - gradle signingReport - gradle assembleRelease - gradle bundleRelease artifacts: paths: - ./src/dist - ./src/android/app/build/outputs test: stage: test image: walljm/node-chrome-headless:21.6 variables: NODE_OPTIONS: "--max_old_space_size=2048" script: - cd ./src - npm ci - npm run-script lint - npm run-script test-headless needs: - build-android deploy-staging: stage: staging image: google/cloud-sdk script: - cd ./src - make deploy-staging rules: - if: '$CI_COMMIT_BRANCH == "main"' when: on_success allow_failure: false needs: - build-android deploy-prod-site: stage: prod image: google/cloud-sdk script: - cd ./src - make deploy-prod rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false needs: - build-android deploy-android: stage: prod image: walljm/gradle_android:8.0.2-jdk17-33-node1 needs: - build-android before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - cd android - gradle publishReleaseBundle artifacts: paths: - ./src/android/app/build/outputs rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false