chore: detect forgotten .meta file commit

pull/226/head
Ikiru Yoshizaki 2021-02-04 02:58:29 +09:00
parent 7d21a75ea8
commit f72a51e13d
1 changed files with 16 additions and 2 deletions

View File

@ -13,6 +13,7 @@ on:
jobs: jobs:
build-dotnet: build-dotnet:
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))"
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_CLI_TELEMETRY_OPTOUT: 1
@ -26,7 +27,7 @@ jobs:
- run: dotnet test -c Debug ./src/UniTask.NetCoreTests/UniTask.NetCoreTests.csproj - run: dotnet test -c Debug ./src/UniTask.NetCoreTests/UniTask.NetCoreTests.csproj
build-unity: 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: strategy:
matrix: matrix:
unity: ["2019.3.9f1", "2020.1.0b5"] 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 # with linux-il2cpp. image from https://hub.docker.com/r/gableroux/unity3d/tags
image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp
steps: 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 - uses: actions/checkout@v2
- run: echo -n "$UNITY_LICENSE" >> .Unity.ulf - run: echo -n "$UNITY_LICENSE" >> .Unity.ulf
env: env:
@ -60,6 +64,16 @@ jobs:
run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
working-directory: src/UniTask 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. # Store artifacts.
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with: