GothicVR Release Job #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GothicVR Release Job | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
######### | |
# BUILD # | |
######### | |
buildForAllPlatforms: | |
name: Build GothicVR for ${{ matrix.targetDevice }} | |
runs-on: self-hosted | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- targetPlatform: StandaloneWindows64 | |
targetDevice: Windows64 | |
- targetPlatform: Android | |
targetDevice: Pico | |
- targetPlatform: Android | |
targetDevice: Quest | |
steps: | |
# Checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
clean: true | |
# Cache | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ matrix.targetPlatform }} | |
restore-keys: Library- | |
# Set Version | |
- name: set Version | |
run: | | |
ref="${{ github.ref }}" | |
tag="${ref#refs/tags/}" | |
echo "Version: $tag" | |
sed -i "s/bundleVersion: 0.1/bundleVersion: $tag/" ProjectSettings/ProjectSettings.asset | |
# Build | |
- name: Build project | |
uses: game-ci/unity-builder@v3 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
versioning: Tag | |
targetPlatform: ${{ matrix.targetPlatform }} | |
allowDirtyBuild: true | |
buildMethod: GVR.Editor.UnityBuildTools.UnityBuilderAction.Perform${{ matrix.targetDevice }}Build | |
# Zip | |
- name: zip | |
run: cd build/${{ matrix.targetDevice }} && zip -r ${{ matrix.targetDevice }}.zip * | |
# - name: ls debug | |
# run: pwd && ls -lah && ls -lah build && ls -lah build/${{ matrix.targetDevice }} | |
# Release | |
# - name: Upload Release Asset | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ github.event.release.upload_url }} | |
# asset_path: build/${{ matrix.targetDevice }}/${{ matrix.targetDevice }}.zip | |
# asset_name: GothicVR-${{ matrix.targetDevice }}.zip | |
# asset_content_type: application/zip | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Build-${{ matrix.targetDevice }} | |
# path: build/${{ matrix.targetDevice }} | |
# expire-in: 2 days |