diff --git a/.github/workflows/Builds.yml b/.github/workflows/Builds.yml index 387a7fd..050d3b5 100644 --- a/.github/workflows/Builds.yml +++ b/.github/workflows/Builds.yml @@ -4,12 +4,8 @@ name: Automated Builds on: - push: - branches: - - main - paths-ignore: - - 'docs/**' - - '*.md' + release: + types: [published] pull_request: types: [opened, synchronize, reopened, edited] @@ -26,17 +22,22 @@ jobs: - StandaloneLinux64 # Build a Linux 64-bit standalone. - WebGL # WebGL. steps: + # First checkout the repo with both LFS and FetchDepth 0 for full commit - name: Checkout Repo uses: actions/checkout@v2 with: fetch-depth: 0 lfs: true + + # Cache project for future speed - name: Cache Project Library for next Build uses: actions/cache@v2 with: path: NQueensSimulation/Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- + + # Use GameCI to build project with TargetPlatform Matrix - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -44,6 +45,8 @@ jobs: projectPath: NQueensSimulation targetPlatform: ${{ matrix.targetPlatform }} versioning: Semantic + + # Upload Build Artifacts *for PR's* - uses: actions/upload-artifact@v2 with: name: Build-${{ matrix.targetPlatform }}