Created
March 16, 2021 22:58
-
-
Save davidmfinol/7fe336b2fec66ef3f6d527fc70afffd8 to your computer and use it in GitHub Desktop.
GitHub Actions workflow for Unity UWP builds
This file contains hidden or 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: Build Unity UWP | |
on: push | |
jobs: | |
buildWithWindows: | |
name: Build for WSAPlayer | |
runs-on: self-hosted # Need to use self-hosted runner with access to enough memory so that builds won't fail due to out of memory | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Setup Unity | |
id: setup-unity | |
uses: kuler90/setup-unity@v1 | |
- name: Activate Unity | |
uses: kuler90/activate-unity@v1 | |
with: | |
unity-username: ${{ secrets.UNITY_EMAIL }} | |
unity-password: ${{ secrets.UNITY_PASSWORD }} | |
unity-serial: ${{ secrets.UNITY_SERIAL }} | |
- name: Build Unity | |
uses: kuler90/build-unity@v1 | |
with: | |
build-target: WSAPlayer | |
build-method: Cgs.Editor.BuildCgs.BuildWSAPlayer | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Restore the Wpf application to populate the obj folder | |
run: msbuild $env:SolutionPath /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier | |
env: | |
SolutionPath: build\WSAPlayer\Card Game Simulator.sln | |
Configuration: Master | |
RuntimeIdentifier: win-x64 | |
- name: Create .appxupload | |
run: msbuild $env:SolutionPath /p:Configuration=$env:Configuration /p:Platform=$env:TargetPlatform /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundle=$env:AppxBundle | |
env: | |
SolutionPath: build\WSAPlayer\Card Game Simulator.sln | |
Configuration: Master | |
TargetPlatform: x64 | |
BuildMode: StoreUpload | |
AppxBundle: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment