Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
feat: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Jul 15, 2020
1 parent 807ba2b commit c84543b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build project

on:
release:
types: [published]

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
buildForSomePlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildName:
- Asteroid
projectPath:
- ./
unityVersion:
- 2019.1.0f2
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.

steps:
- uses: actions/checkout@v2
with:
lfs: true

- uses: webbertakken/[email protected]
with:
buildName: ${{ matrix.buildName }}
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}

- uses: actions/upload-artifact@v1
with:
name: Build
path: build

- name: Zip Binary
run: zip -r Asteroid_${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}/*

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./Asteroid_${{ matrix.targetPlatform }}.zip
asset_name: Asteroid_${{ matrix.targetPlatform }}.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: Vidar-Team
productName: D3CTF biubiubiu
productName: Asteroid
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
Expand Down

0 comments on commit c84543b

Please sign in to comment.