Skip to content

Commit

Permalink
Split workflows to build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Muppets committed Jan 19, 2020
1 parent 077171a commit c26d61c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 22 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/activation.yml.onetime

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/main.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build

on:
pull_request: {}
Expand Down Expand Up @@ -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 }}
- run: zip -r Build.zip build/StandaloneWindows64-2019.2.11f1
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}

0 comments on commit c26d61c

Please sign in to comment.