diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml new file mode 100644 index 00000000..232e47fa --- /dev/null +++ b/.github/workflows/activation.yml @@ -0,0 +1,21 @@ +name: Acquire activation file + +on: + workflow_dispatch: {} + +jobs: + activation: + name: Request manual activation file 🔑 + runs-on: ubuntu-latest + steps: + # Request manual activation file + - name: Request manual activation file + id: getManualLicenseFile + uses: game-ci/unity-request-activation-file@v2 + + # Upload artifact (Unity_v20XX.X.XXXX.alf) + - name: Expose as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.getManualLicenseFile.outputs.filePath }} + path: ${{ steps.getManualLicenseFile.outputs.filePath }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..f8eef938 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,57 @@ +name: Build my project ✨ + +on: [push, pull_request] + +jobs: + build: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneWindows64 + - StandaloneWindows + - StandaloneLinux64 + - StandaloneOSX + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + # with: + # lfs: true + + # Cache resued Library files to speed up compilation + - uses: actions/cache@v2 + with: + path: Library + key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} + restore-keys: | + Library- + + # Test (No tests yet, leaving this here for future.) + # - name: Run tests + # uses: game-ci/unity-test-runner@v2 + # env: + # UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + # with: + # githubToken: ${{ secrets.GITHUB_TOKEN }} + + # Build project with Unity + - name: Build project + uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + unityVersion: auto + buildName: Heaven Studio + buildsPath: build + targetPlatform: ${{ matrix.targetPlatform }} + + # Output + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.targetPlatform }}-build + path: ./build/${{ matrix.targetPlatform }}/