From c26d61c3372fe3ff2953aaf23a125afbc18fd064 Mon Sep 17 00:00:00 2001 From: Neil Bostrom Date: Sun, 19 Jan 2020 13:44:17 +0000 Subject: [PATCH] Split workflows to build and release --- .github/workflows/activation.yml.onetime | 15 ----- .github/workflows/{main.yml => build.yml} | 9 +-- .github/workflows/release.yml | 69 +++++++++++++++++++++++ 3 files changed, 71 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/activation.yml.onetime rename .github/workflows/{main.yml => build.yml} (90%) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/activation.yml.onetime b/.github/workflows/activation.yml.onetime deleted file mode 100644 index e7970603..00000000 --- a/.github/workflows/activation.yml.onetime +++ /dev/null @@ -1,15 +0,0 @@ -name: Acquire activation file - -jobs: - activation: - name: Request manual activation file 🔑 - runs-on: ubuntu-latest - steps: - - name: Request manual activation file - uses: webbertakken/unity-request-manual-activation-file@v1 - id: getManualLicenseFile - - name: Expose as artifact - uses: actions/upload-artifact@v1 - with: - name: ${{ steps.getManualLicenseFile.outputs.filePath }} - path: ${{ steps.getManualLicenseFile.outputs.filePath }} diff --git a/.github/workflows/main.yml b/.github/workflows/build.yml similarity index 90% rename from .github/workflows/main.yml rename to .github/workflows/build.yml index 107d9fbf..a5b4b0a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: pull_request: {} @@ -61,9 +61,4 @@ jobs: with: name: Build path: build/StandaloneWindows64-2019.2.11f1 - - run: zip -r Build.zip build/StandaloneWindows64-2019.2.11f1 - - uses: JasonEtco/upload-to-release@master - with: - args: Build.zip application/zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - run: zip -r Build.zip build/StandaloneWindows64-2019.2.11f1 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..18103d8f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,69 @@ +name: Release + +on: + release: + types: [created] + +env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + +jobs: + requestActivation: + name: Request activation ✔ + runs-on: ubuntu-latest + steps: + # Checkout repository + - name: Checkout repository + uses: actions/checkout@v1 + + # Activate Unity + - name: Unity - Activate + uses: webbertakken/unity-activate@v1 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + + testRunnerInEditMode: + name: Test in editmode 📝 + runs-on: ubuntu-latest + steps: + # Checkout repository (required to test local actions) + - name: Checkout repository + uses: actions/checkout@v1 + + # Configure test runner + - name: Run tests + id: testRunner + uses: webbertakken/unity-test-runner@v1 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_PROJECT_PATH: /HohimBrueh + TEST_MODE: editmode + + # Upload artifact + - name: Expose as artifact + uses: actions/upload-artifact@v1 + with: + name: Test results (edit mode) + path: ${{ steps.testRunner.outputs.artifactsPath }} + + buildForWindows: + name: Build for Windows 🗗 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: webbertakken/unity-builder@v0.5 + with: + projectPath: /HohimBrueh + unityVersion: 2019.2.11f1 + targetPlatform: StandaloneWindows64 + - run: sudo mv build/StandaloneWindows64-2019.2.11f1/StandaloneWindows64 build/StandaloneWindows64-2019.2.11f1/StandaloneWindows64.exe + - uses: actions/upload-artifact@v1 + with: + name: Windows64 + path: build/StandaloneWindows64-2019.2.11f1 + - run: zip -r Windows64.zip build/StandaloneWindows64-2019.2.11f1 + - uses: JasonEtco/upload-to-release@master + with: + args: Windows64.zip application/zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file