Files
2022-12-31 05:00:54 -08:00

68 lines
1.6 KiB
YAML

name: Build
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch: {}
jobs:
build:
name: Build launcher
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true
# Cache
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref_name == 'master' }}
# Build
- 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:
targetPlatform: Android
allowDirtyBuild: true
buildName: "HooverHighQuestAppLauncher-DEV"
# Output
- name: Upload build
uses: softprops/action-gh-release@v1
with:
files: build/Android/*.apk
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: "1.0.0-dev"
# Upload dir
- uses: actions/upload-artifact@v2
with:
name: Build-dev
path: build
# Return License
- name: Return license
uses: game-ci/unity-return-license@v2
if: always()