diff --git a/.github/workflows/beta-deployment.yml b/.github/workflows/beta-deployment.yml index 0e17e01..91aab2f 100644 --- a/.github/workflows/beta-deployment.yml +++ b/.github/workflows/beta-deployment.yml @@ -13,14 +13,47 @@ on: branches: - main workflow_dispatch: + inputs: + environment: + description: | + The GitHub deployment environment. + required: false + type: string + default: 'staging' + workflow_call: + inputs: + environment: + description: | + The GitHub deployment environment. + required: false + type: string + default: 'staging' concurrency: group: main cancel-in-progress: false jobs: + determineenvironment: + runs-on: ubuntu-latest + outputs: + environment: ${{ steps.set-env.outputs.environment }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Determine target repository, environment, and version + id: set-env + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "::set-output name=environment::${{ inputs.environment }}" + elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then + echo "::set-output name=environment::${{ inputs.environment }}" + else + echo "::set-output name=environment::staging" + fi buildandtest: name: Build and Test + needs: determineenvironment uses: ./.github/workflows/build-and-test.yml permissions: contents: read @@ -30,33 +63,33 @@ jobs: iosapptestflightdeployment: name: iOS App TestFlight Deployment needs: buildandtest + needs: [determineenvironment, buildandtest] uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 permissions: contents: read with: runsonlabels: '["macOS", "self-hosted"]' - environment: staging + environment: ${{ needs.determineenvironment.outputs.environment }} googleserviceinfoplistpath: 'PAWS/Supporting Files/GoogleService-Info.plist' setupsigning: true fastlanelane: beta secrets: inherit vars: name: Inject Environment Variables In Deployment Workflow - needs: iosapptestflightdeployment runs-on: ubuntu-latest - environment: staging + environment: ${{ needs.determineenvironment.outputs.environment }} outputs: FIREBASE_PROJECT_ID: ${{ vars.FIREBASE_PROJECT_ID }} steps: - run: echo "Injecting Environment Variables In Deployment Workflow ..." deployfirebase: name: Deploy Firebase Project - needs: vars + needs: [determineenvironment, vars, iosapptestflightdeployment] uses: StanfordBDHG/.github/.github/workflows/firebase-deploy.yml@v2 permissions: contents: read with: - environment: staging + environment: ${{ needs.determineenvironment.outputs.environment }} arguments: '--project ${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}' secrets: GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 0000000..b12a53d --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,32 @@ +# +# This source file is part of the PAWS application based on the Stanford Spezi Template Application project +# +# SPDX-FileCopyrightText: 2023 Stanford University +# +# SPDX-License-Identifier: MIT +# + +name: Production Deployment + +on: + workflow_dispatch: + push: + tags: + - "*" + workflow_dispatch: + +concurrency: + group: production + cancel-in-progress: false + +jobs: + deployment: + name: Production Deployment + uses: ./.github/workflows/beta-deployment.yml + permissions: + contents: read + actions: read + security-events: write + secrets: inherit + with: + environment: production diff --git a/PAWS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/PAWS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 24d870b..973188c 100644 --- a/PAWS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/PAWS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/abseil-cpp-binary.git", "state" : { - "revision" : "748c7837511d0e6a507737353af268484e1745e2", - "version" : "1.2024011601.1" + "revision" : "194a6706acbd25e4ef639bcaddea16e8758a3e27", + "version" : "1.2024011602.0" } }, { @@ -51,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk.git", "state" : { - "revision" : "e57841b296d04370ea23580f908881b0ccab17b9", - "version" : "10.28.1" + "revision" : "eca84fd638116dd6adb633b5a3f31cc7befcbb7d", + "version" : "10.29.0" } }, { @@ -96,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193", - "version" : "3.4.1" + "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b", + "version" : "3.5.0" } }, { @@ -105,8 +105,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR.git", "state" : { - "revision" : "418929f315f37e6d9c8f30f40030bc65b9cc47c9", - "version" : "0.2.8" + "revision" : "b0cfe35a2263a517b22196b559d2dd1d1e2afcd9", + "version" : "0.2.9" } }, { @@ -159,8 +159,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/Spezi", "state" : { - "revision" : "5ada3f3a18c86a658d140c6f4c45ca2e9d5e61ce", - "version" : "1.4.0" + "revision" : "d87e3d8104a0732c0e294e9ae6354db4a7058800", + "version" : "1.6.0" } }, { @@ -186,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziFirebase.git", "state" : { - "revision" : "00ff0db12bf72ba39354e263d8f916ae8392368b", - "version" : "1.1.2" + "revision" : "e381b7d0fac1bf94e3257680c9af741e16b67817", + "version" : "1.1.4" } }, { @@ -195,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziFoundation.git", "state" : { - "revision" : "3326feab3dac120c16af63243615592990d33516", - "version" : "1.1.2" + "revision" : "4781d96a09587f3d47ac3f3e71d197149b288146", + "version" : "1.1.3" } }, { @@ -231,8 +231,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziStorage.git", "state" : { - "revision" : "b958df9b31f24800388a7bfc28f457ce7b82556c", - "version" : "1.0.2" + "revision" : "9d04bc622c65002aee704b4de5735970a6e19f46", + "version" : "1.1.0" } }, { @@ -258,8 +258,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections.git", "state" : { - "revision" : "ee97538f5b81ae89698fd95938896dec5217b148", - "version" : "1.1.1" + "revision" : "3d2dc41a01f9e49d84f0a3925fb858bed64f702d", + "version" : "1.1.2" } }, { @@ -276,8 +276,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", - "version" : "1.26.0" + "revision" : "e17d61f26df0f0e06f58f6977ba05a097a720106", + "version" : "1.27.1" } }, { @@ -321,8 +321,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/XCTestExtensions.git", "state" : { - "revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc", - "version" : "0.4.10" + "revision" : "cc2705fde81978eacd5496e14c9caf58909e2322", + "version" : "0.4.12" } }, { @@ -339,8 +339,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/XCTRuntimeAssertions", "state" : { - "revision" : "51da3403f128b120705571ce61e0fe190f8889e6", - "version" : "1.0.1" + "revision" : "7ce28015c0bee62b523a860e343e3d6b7ec40fda", + "version" : "1.1.1" } }, { @@ -348,8 +348,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "9234124cff5e22e178988c18d8b95a8ae8007f76", - "version" : "5.1.2" + "revision" : "3036ba9d69cf1fd04d433527bc339dc0dc75433d", + "version" : "5.1.3" } } ],