Giter Site home page Giter Site logo

mikelduke / love-build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nhartland/love-build

0.0 1.0 0.0 80 KB

GitHub Action for building a LÖVE Project

Home Page: https://github.com/marketplace/actions/love-build

License: MIT License

Dockerfile 9.43% Shell 71.38% Lua 19.19%

love-build's Introduction

love-build

Tests

GitHub Action for building a LÖVE Project.

This action produces a LÖVE file, along with macOS and Windows executable packages for a LÖVE project. For projects making use of luarocks packages, this build action supports the bundling of dependencies via a user-defined rockspec.

For macOS application configuration, you can supply an Info.plist file in the source directory which will be copied into the built application. If not provided, the default LÖVE Info.plist will be used.

Basic Configuration

To build and upload a LÖVE 11.3 project with the main.lua at the root of your repository, use the following job steps:

steps:
- uses: actions/checkout@v2
# Build the applications
- uses: nhartland/love-build@v1-beta2
  with:
   app_name: 'hello_world'
   love_version: '11.3'
# Upload the built applications
- uses: actions/upload-artifact@v1
  with:
    name: built-applications
    path: 'release'

Extended configuration

steps:
- uses: actions/checkout@v2
- uses: nhartland/love-build@v1-beta2
  with:
    app_name: 'hello_world'
    love_version: '11.3'
    # Use when the `main.lua` is in a subdirectory of your repository (here in `src/love`).
    source_dir: 'src/love'
    # Specifies the output location for the distributables, by default 'release'.
    result_dir: 'nondefault_result_dir'
    # Sets up luarocks dependencies according to provided rockspec
    # Use the path relative to your repository root.
    dependencies: 'dependencies-1-1.rockspec'

To see the full options specification please refer to the action.yml.

Produced artifacts

The built applications are located in the results_dir path, by default the root of your repository. This action returns four output variables specifying the filenames relative to the working directory.

  love-filename: 
    description: 'Filename of built love file'
  win32-filename: 
    description: 'Filename of built win32 application'
  win64-filename: 
    description: 'Filename of built win64 application'
  macos-filename: 
    description: 'Filename of built macos application'

The applications can therefore be built and individually uploaded with the following steps:

steps:
- uses: actions/checkout@v2
- uses: nhartland/love-build@v1-beta2
  id: love-build
  with:
    app_name: 'hello_world'
    love_version: '11.3'
- uses: actions/upload-artifact@v1
  with:
    name: macos-build
    path: ${{ steps.love-build.outputs.macos-filename }}
- uses: actions/upload-artifact@v1
  with:
    name: win32-build
    path: ${{ steps.love-build.outputs.win32-filename }}
- uses: actions/upload-artifact@v1
  with:
    name: win64-build
    path: ${{ steps.love-build.outputs.win64-filename }}
- uses: actions/upload-artifact@v1
  with:
    name: love-build
    path: ${{ steps.love-build.outputs.love-filename }}

LuaRocks dependencies

Important Note: LÖVE Build can only handle pure Lua dependencies and cannot correctly build native libraries.

You can specify the dependencies of your LÖVE application using a rockspec. These dependencies will be bundled in with the packaged LÖVE executables and the required include paths added to the LÖVE path by means of prepending module_loader.lua to your main.lua. The LuaRocks integration depends only on the LuaRocks command line utilities and not on the LuaRocks API.

The rockspec doesn't need to specify anything about your application other than the dependencies. For example:

-- dependencies-1-1.rockspec
package = "dependencies"
version = "1-1"
source = {
    url = 'none' -- Not required for local build
}
-- List your required dependencies here in the standard
-- rockspec format
dependencies = {
   "etlua ~> 1.3",
   "argparse ~> 0.5",
   "loadconf >= 0.3.4, < 0.4"
}
build = {
   type = "none"
}

Working Examples

In this directory are two test cases, a basic "Hello World" with no dependencies, and a Game of Life simulation showing how LuaRocks dependencies are bundled.

Limitations

This action so far only performs the minimal build required for getting applications running, for example icons are not yet configurable.

Furthermore the macOS build is unverified by Apple and therefore will need to be manually opened in the Security and Preferences pane at least for the first time it is run.

love-build's People

Contributors

nhartland avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.