name: Builds - Ubuntu on: workflow_dispatch: push: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==" jobs: buildForAllPlatformsUbuntu: name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: providerStrategy: # - local-docker - local projectPath: - test-project unityVersion: - 2021.3.32f1 - 2022.3.13f1 - 2023.1.19f1 targetPlatform: - StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend. - StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend. - StandaloneLinux64 # Build a Linux 64-bit standalone with mono backend. - iOS # Build an iOS player. - Android # Build an Android .apk. - WebGL # WebGL. steps: ########################### # Checkout # ########################### - uses: actions/checkout@v4 with: lfs: true ########################### # Cache # ########################### - uses: actions/cache@v3 with: path: ${{ matrix.projectPath }}/Library key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }} restore-keys: | Library-${{ matrix.projectPath }}-ubuntu- Library- ########################### # Build # ########################### - name: Build uses: ./ id: build-1 continue-on-error: true env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} customParameters: -profile SomeProfile -someBoolean -someValue exampleValue providerStrategy: ${{ matrix.providerStrategy }} - name: Sleep for Retry if: ${{ steps.build-1.outcome == 'failure' }} run: | sleep 60 - name: Build (Retry 1) uses: ./ id: build-2 if: ${{ steps.build-1.outcome == 'failure' }} continue-on-error: true env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} customParameters: -profile SomeProfile -someBoolean -someValue exampleValue providerStrategy: ${{ matrix.providerStrategy }} allowDirtyBuild: true - name: Sleep for Retry if: ${{ steps.build-2.outcome == 'failure' }} run: | sleep 240 - name: Build (Retry 2) uses: ./ id: build-3 if: ${{ steps.build-2.outcome == 'failure' }} env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} customParameters: -profile SomeProfile -someBoolean -someValue exampleValue providerStrategy: ${{ matrix.providerStrategy }} allowDirtyBuild: true ########################### # Upload # ########################### - uses: actions/upload-artifact@v3 with: name: Build Ubuntu (${{ matrix.unityVersion }}) path: build retention-days: 14