build-godot-action icon indicating copy to clipboard operation
build-godot-action copied to clipboard

Filetypes gone after building

Open lreinink opened this issue 3 years ago • 5 comments

Hello, when I'm building the project on my machine it works for Windows and Mac, but when using your tool, the filetypes are gone. For Windows, I can just add .exe behind it, and it works, but for Mac, adding .app behind it does not work. Am I doing something wrong here?

lreinink avatar Mar 16 '21 21:03 lreinink

We've run into this as well and after some testing, it seems like it is because this Action invokes the command like this:

godot --export "platform" name

The name specifies the filename of the exported file, and it comes from what's written in your Action yml, e.g.:

        with:
          name: my-game

In this case, it'd run godot --export "platform" my-game, and this my-game overrides the name from the export preset which presumably has the correct ending.

The Godot docs sound like the ending should be appended automatically when exporting like this, so maybe that's where this issue comes from. Elsewhere in the docs, however, the ending is included in this name parameter.

Either way, it might be helpful to add an option which does not include any name override and just uses the name configured in the preset.

kb173 avatar Jan 16 '22 15:01 kb173

This is easily fixed by adding some extra fields in the matrix. Here's an example config:

name: Build Godot

on:
  push: {}
  pull_request: {}

jobs:
  Godot:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        platform:
        - name: Windows
          file: game.exe
        - name: MacOS
          file: game.zip
        - name: Linux
          file: game
    steps:
      - uses: actions/checkout@v2
      - name: Build
        id: build
        uses: manleydev/[email protected]
        with:
          name: ${{ matrix.platform.file }}
          preset: ${{ matrix.platform.name }}
          debugMode: false
      - name: Upload Artifact
        uses: actions/upload-artifact@v2
        with:
          name: Game - ${{ matrix.platform.name }}
          path: ${{ github.workspace }}/${{ steps.build.outputs.build }}

Edit: Fixed MacOS file extension for anyone googling for a solution.

semirix avatar May 26 '22 16:05 semirix

For Windows, I can just add .exe behind it, and it works, but for Mac, adding .app behind it does not work. Am I doing something wrong here?

The suffix to use for macOS exporting is .zip or .dmg. .app can't be used directly (although an .app is contained within the generated ZIP).

Calinou avatar May 26 '22 18:05 Calinou

The suffix to use for macOS exporting is .zip or .dmg. .app can't be used directly (although an .app is contained within the generated ZIP).

@Calinou Ah, so for MacOS binaries, the following applies:

OS Used to Export Resulting File for Mac Binary
Linux .zip
Windows .zip
MacOS .dmg

semirix avatar May 27 '22 03:05 semirix

@Calinou Ah, so for MacOS binaries, the following applies: OS Used to Export Resulting File for Mac Binary Linux .zip Windows .zip MacOS .dmg

Yes, although you can still use the .zip target when exporting from macOS (it can do both .zip and .dmg).

Calinou avatar May 27 '22 08:05 Calinou