From f72a51e13d02c7a7fd8046cfcd753820c662199a Mon Sep 17 00:00:00 2001 From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com> Date: Thu, 4 Feb 2021 02:58:29 +0900 Subject: [PATCH] chore: detect forgotten .meta file commit --- .github/workflows/build-debug.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index 367e745..6f99440 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -13,6 +13,7 @@ on: jobs: build-dotnet: + if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" runs-on: ubuntu-latest env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -26,7 +27,7 @@ jobs: - run: dotnet test -c Debug ./src/UniTask.NetCoreTests/UniTask.NetCoreTests.csproj build-unity: - if: "(github.event == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:')" + if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]')) && ((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:'))" strategy: matrix: unity: ["2019.3.9f1", "2020.1.0b5"] @@ -40,7 +41,10 @@ jobs: # with linux-il2cpp. image from https://hub.docker.com/r/gableroux/unity3d/tags image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp steps: - - run: apt update && apt install git -y + # Ubuntu 18.04 git is too old, use ppa latest git. + - run: | + apt-get update && apt-get install --no-install-recommends -y software-properties-common && add-apt-repository -y ppa:git-core/ppa + apt-get update && apt-get install --no-install-recommends -y git - uses: actions/checkout@v2 - run: echo -n "$UNITY_LICENSE" >> .Unity.ulf env: @@ -60,6 +64,16 @@ jobs: run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export working-directory: src/UniTask + - name: check all .meta is commited + run: | + if git ls-files --others --exclude-standard -t | grep --regexp='[.]meta$'; then + echo "Detected .meta file generated. Do you forgot commit a .meta file?" + exit 1 + else + echo "Great, all .meta files are commited." + fi + working-directory: src/UniTask + # Store artifacts. - uses: actions/upload-artifact@v2 with: