Skip to content

robpc/godot-build-info-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Godot Build Info

Adds settings for Godot projects at build time related to the build.

Project Settings

Settings added/changed by this action:

build_info/package/version
build_info/package/build_date
build_info/source/commit

The action uses the override.cfg file to add the build settings to the project. It is assumed that either the override.cfg either doesn't exist or the [build_info] section is not present. It is ok to add these to the Project Settings for testing as the override.cfg will override them. The settings can be accessed like any other Project Setting using ProjectSettings.get_setting(name), etc. See the Godot Project Setting Documentation for more info.

Inputs

Input name Default Description
version '' package version
commit $GITUB_SHA commit hash
build_date Generated from date Date/Time when the package was built
file override.cfg File to add the settings

Each input can be used to override the related setting, but all come with sensible defaults, except version which defaults to ''.

Example

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2
        with:
          lfs: true
      - run: echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
      - name: Add Build Info
        uses: robpc/godot-build-info-action@v1
        with:
          version: ${{ env.version }}
      - name: Export ${{ matrix.preset }} from Godot
        uses: robpc/godot-export-action@v3.3.1
        with:
          preset: windows
          export_path: build/my-game-v${{env.version}}.exe

About

Add version and other info at build time for Godot Engine projects

Resources

Stars

Watchers

Forks

Packages

No packages published