specify dockerWorkspacePath because apparently it doesn't work otherw… #3
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: Full Build | |
permissions: | |
contents: write | |
# Trigger when pushing tags | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
path: master | |
- name: Checkout MonoBehaviour | |
uses: actions/checkout@v4 | |
with: | |
ref: MonoBehaviour | |
path: MonoBehaviour | |
- name: Checkout Unity | |
uses: actions/checkout@v4 | |
with: | |
ref: Unity | |
path: Unity | |
- name: Setup MAPI | |
uses: BadMagic100/setup-hk@v2 | |
with: | |
apiPath: HkRefs | |
dependencyFilePath: master/ModDependencies.txt | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
- name: Install dependencies MonoBehaviour | |
run: dotnet restore | |
working-directory: MonoBehaviour | |
- name: Install dependencies master | |
run: dotnet restore | |
working-directory: master | |
- name: Build MonoBehaviour | |
run: dotnet build -c Release | |
working-directory: MonoBehaviour | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: StandaloneWindows | |
projectPath: Unity | |
buildsPath: Unity/build | |
buildMethod: CreateAssetBundles.BuildAllAssetBundlesCompressed | |
dockerWorkspacePath: /github/workspace | |
- name: Build master | |
run: dotnet build -c Release | |
working-directory: master | |
- name: Prepare master artifacts for release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Publish-Master | |
path: master/bin/Publish | |
release: | |
needs: | |
- build | |
runs-on: windows-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Get build details | |
id: details | |
# this assumes that an MSBuild task that writes the SHA256 of the zip file to SHA.txt, and the mod version (usually | |
# the same as the assembly version) to version.txt. The contents of these files are read to step outputs for use in release | |
run: | | |
$sha = (Get-Content artifacts/Publish-Master/TestOfTeamwork/SHA.txt)[3] | |
$ver = "${{ github.ref_name }}" | |
echo "archiveHash=$sha" >> $env:GITHUB_OUTPUT | |
echo "buildVersion=$ver" >> $env:GITHUB_OUTPUT | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: false | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
tag_name: ${{ steps.details.outputs.buildVersion }} | |
body: | | |
SHA256 of TestOfTeamwork.zip: ${{ steps.details.outputs.archiveHash }} | |
Attachments: | |
- TestOfTeamwork.zip | |
- to be used for the ModInstaller | |
- TestOfTeamwork.dll | |
- the mod, also inside TestOfTeamwork.zip | |
files: | | |
artifacts/Publish-Master/TestOfTeamwork/TestOfTeamwork.zip | |
artifacts/Publish-Master/TestOfTeamwork/TestOfTeamwork.dll |