game-ci / unity-builder

Build Unity projects for different platforms
https://github.com/marketplace/actions/unity-builder
MIT License
852 stars 250 forks source link

Ability to Customize Executable File Name in game-ci/unity-builder #675

Closed amanao closed 1 month ago

amanao commented 1 month ago

Hello,

I am currently using game-ci/unity-builder to build my Unity projects. However, I am encountering an issue with the naming of the executable file. The executables are presently named as "StandaloneWindows64.exe".

This naming convention poses a problem when using game-ci/steam-deploy, as Steam expects a different file name, thereby preventing the game from launching correctly.

Is there a way to customize the name of the executable file within game-ci/unity-builder? Below is a snippet of the code I am currently using for my builds (some parts have been altered for confidentiality):

name: AutoBuild_And_Deploy

on:
  pull_request: {}
  push: { branches: [develop, xxxx] }

jobs:
  buildAndTestForPlatforms:
    name: Build for ${{ matrix.targetPlatform }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        projectPath:
          - AAAAAAAAA
        unityVersion:
          - xxx.xxx
        targetPlatform:
          - xxxxxx
          - xxxx
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/cache@v3
        with:
          path: ${{ matrix.projectPath }}/Library
          key:
            Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{
            hashFiles(matrix.projectPath) }}
          restore-keys: |
            Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
            Library-${{ matrix.projectPath }}-
            Library-
      - uses: game-ci/unity-builder@v4
        env:
          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
          UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
          UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
        with:
          projectPath: ${{ matrix.projectPath }}
          unityVersion: ${{ matrix.unityVersion }}
          targetPlatform: ${{ matrix.targetPlatform }}
          customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
      - uses: actions/upload-artifact@v3
        with:
          name: Build
          path: build

Any guidance or suggestions on how to achieve this would be greatly appreciated!

Thank you.

amanao commented 1 month ago

When I used buildName, I was able to achieve what I wanted. Thank you.