1
0
mirror of https://github.com/tooot-app/app synced 2024-12-23 08:09:18 +01:00
tooot/.github/workflows/build.yml
2022-11-14 17:54:11 +01:00

117 lines
4.5 KiB
YAML

name: build
on:
push:
branches:
- candidate
- release
jobs:
build-ios:
runs-on: macos-12
steps:
- name: -- Step 0 -- Extract branch name
uses: tj-actions/branch-names@v6
id: branch
- name: -- Step 1 -- Checkout code
uses: actions/checkout@v3
- name: -- Step 2 -- Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: -- Step 3 -- Install node dependencies
run: yarn install
- name: -- Step 4 -- Install ruby dependencies
run: bundle install
- name: -- Step 5 -- Run fastlane
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
GH_PAT_GET_RELEASE: ${{ secrets.GITHUB_TOKEN }}
run: yarn app:build ios
build-android:
runs-on: macos-12
steps:
- name: -- Step 0 -- Extract branch name
uses: tj-actions/branch-names@v6
id: branch
- name: -- Step 1 -- Checkout code
uses: actions/checkout@v3
- name: -- Step 2 -- Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: -- Step 3 -- Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: -- Step 4 -- Install node dependencies
run: yarn install
- name: -- Step 5 -- Install ruby dependencies
run: bundle install
- name: -- Step 6 -- Run fastlane
env:
ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
ANDROID_KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.SUPPLY_JSON_KEY_DATA }}
GH_PAT_GET_RELEASE: ${{ secrets.GITHUB_TOKEN }}
run: yarn app:build android
create-release:
runs-on: macos-12
needs: [build-ios, build-android]
steps:
- name: -- Step 0 -- Extract branch name
uses: tj-actions/branch-names@v6
id: branch
- name: -- Step 1 -- Checkout code
uses: actions/checkout@v3
- name: -- Step 2 -- Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: -- Step 3 -- Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: -- Step 4 -- Install node dependencies
run: yarn install
- name: -- Step 5 -- Install ruby dependencies
run: bundle install
- name: -- Step 6 -- Run fastlane
env:
ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
ANDROID_KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
FL_GITHUB_RELEASE_API_BEARER: ${{ secrets.GITHUB_TOKEN }}
run: yarn app:build release