From 55f03cf6d35ee95792f8362e1dbd766e2221ad7e Mon Sep 17 00:00:00 2001 From: Shawn Kuang Date: Mon, 21 Aug 2023 12:12:05 -0700 Subject: [PATCH 1/4] incremental change --- .github/workflows/build.yaml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72708c52..d2cadbdf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,16 +35,37 @@ env: hashCommand: "sha256sum" jobs: + # Set default value for scheduled cron job + check_and_prepare: + runs-on: ubuntu-latest + outputs: + unity_version: ${{ steps.set_outputs.outputs.unity_version }} + steps: + - uses: actions/checkout@v3 + + - id: set_outputs + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "unity_version=${{ github.event.inputs.unity_version }}" >> $GITHUB_OUTPUT + else + echo "unity_version=2019" >> $GITHUB_OUTPUT + fi + + - name: Print output + run: | + echo outputs.unity_version : ${{ steps.set_outputs.outputs.unity_version }} + build_macos: - name: build-macos-unity${{ inputs.unity_version}} + name: build-macos-unity${{ needs.check_and_prepare.outputs.unity_version }} + needs: [check_and_prepare] uses: ./.github/workflows/build_macos.yaml with: - unity_version: ${{ inputs.unity_version}} + unity_version: {{ needs.check_and_prepare.outputs.unity_version }} finalizing: # Only compute SHA hash for macOS build - name: finalizing-macOS-unity${{ inputs.unity_version}} - needs: [build_macos] + name: finalizing-macOS-unity{{ needs.check_and_prepare.outputs.unity_version }} + needs: [check_and_prepare, build_macos] runs-on: ubuntu-latest steps: - name: Fetch All builds From 9d54b976db0b14df0fbbd65f4dfc6be538a97940 Mon Sep 17 00:00:00 2001 From: Shawn Kuang Date: Mon, 21 Aug 2023 12:16:13 -0700 Subject: [PATCH 2/4] incremental change --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d2cadbdf..ec5aa733 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,11 +60,11 @@ jobs: needs: [check_and_prepare] uses: ./.github/workflows/build_macos.yaml with: - unity_version: {{ needs.check_and_prepare.outputs.unity_version }} + unity_version: ${{ needs.check_and_prepare.outputs.unity_version }} finalizing: # Only compute SHA hash for macOS build - name: finalizing-macOS-unity{{ needs.check_and_prepare.outputs.unity_version }} + name: finalizing-macOS-unity${{ needs.check_and_prepare.outputs.unity_version }} needs: [check_and_prepare, build_macos] runs-on: ubuntu-latest steps: From 15afebb1698236a5ab0541f53bde8b9f249dec2f Mon Sep 17 00:00:00 2001 From: Shawn Kuang Date: Mon, 21 Aug 2023 12:18:30 -0700 Subject: [PATCH 3/4] incremental change --- .github/workflows/build.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ec5aa733..8a655389 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,19 +35,17 @@ env: hashCommand: "sha256sum" jobs: - # Set default value for scheduled cron job check_and_prepare: runs-on: ubuntu-latest outputs: unity_version: ${{ steps.set_outputs.outputs.unity_version }} steps: - - uses: actions/checkout@v3 - - id: set_outputs run: | if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "unity_version=${{ github.event.inputs.unity_version }}" >> $GITHUB_OUTPUT else + # inputs are not available for cron. Therefore, set default value here. echo "unity_version=2019" >> $GITHUB_OUTPUT fi From 8355bcb5d64e64da65fd291f585e4b0d7a14c230 Mon Sep 17 00:00:00 2001 From: Shawn Kuang Date: Mon, 21 Aug 2023 12:19:38 -0700 Subject: [PATCH 4/4] incremental change --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8a655389..b7da39e3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "unity_version=${{ github.event.inputs.unity_version }}" >> $GITHUB_OUTPUT else - # inputs are not available for cron. Therefore, set default value here. + # inputs are not available for non "workflow_dispatch" events. Therefore, set default value here. echo "unity_version=2019" >> $GITHUB_OUTPUT fi