From c34281fe07aea31d8e1be5f80881c135665ee818 Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Mon, 8 Jul 2024 10:54:39 -0400 Subject: [PATCH] build: use environment for release --- .github/workflows/build-shared-ios.yml | 20 ++++++++++---------- .github/workflows/ios_release.yml | 11 +++++------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-shared-ios.yml b/.github/workflows/build-shared-ios.yml index 27081351fc..5d875fc386 100644 --- a/.github/workflows/build-shared-ios.yml +++ b/.github/workflows/build-shared-ios.yml @@ -9,14 +9,6 @@ on: required: false type: string default: 'false' - ENV: - required: false - type: string - default: 'staging' - TERRASO_BACKEND: - required: false - type: string - default: 'https://api.staging.terraso.net' APP_BUILD: required: false type: string @@ -44,13 +36,14 @@ on: required: false jobs: + environment: ${{ github.event.inputs.environment }} ios-build: name: iOS Build runs-on: macos-14 env: STRICT: ${{ inputs.STRICT }} - ENV: ${{ inputs.ENV }} - TERRASO_BACKEND: ${{ inputs.TERRASO_BACKEND }} + ENV: ${{ vars.ENV }} + TERRASO_BACKEND: ${{ vars.TERRASO_BACKEND }} APP_BUILD: ${{ inputs.APP_BUILD }} GOOGLE_OAUTH_ANDROID_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_ANDROID_CLIENT_ID }} GOOGLE_OAUTH_IOS_CLIENT_ID: ${{ vars.GOOGLE_OAUTH_IOS_CLIENT_ID }} @@ -71,6 +64,13 @@ jobs: LDPLUSPLUS: clang++ steps: + - name: test + run: | + echo "environment = ${{ github.event.inputs.environment }}" + echo "ENV = ${{ env.ENV }}" + echo "TERRASO_BACKEND = ${{ env.TERRASO_BACKEND }}" + exit 1 + - name: Check out git repository uses: actions/checkout@v4 diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml index b56b3f1b27..4f4703e9e4 100644 --- a/.github/workflows/ios_release.yml +++ b/.github/workflows/ios_release.yml @@ -3,15 +3,14 @@ name: iOS Release on: workflow_dispatch: inputs: - APP_BUILD: - description: 'Build number (i.e. 153)' - default: '153' - type: string - required: true environment: description: 'Release environment' - type: environment + type: choice required: true + default: staging + options: + - staging + - production push: tags: - 'v[0-9]+'