From a4aa6e75b7d11c9f5eb4c0f9bae1dc2c90249ef1 Mon Sep 17 00:00:00 2001 From: Marquis Kurt Date: Fri, 20 Sep 2019 13:33:41 -0400 Subject: [PATCH] [renpy-build] Add outputs and finalize README --- README.md | 22 +++++++++++++++++++--- action.yml | 5 +++++ build.sh | 3 +++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c359542..4e7bbb7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,23 @@ # Build Ren'Py Project -Make distributable versions of your Ren'Py visual novel in GitHub actions. +This GitHub action allows you to make distributable builds of a Ren'Py visual novel project in a workflow and use the built files for distribution. -## Parameters +## Usage -- `sdk-version`: (Required) The version of the SDK to use. Defaults to `7.3.2`. +```yml +- name: Build VN project + uses: ProjectAliceDev/renpy-build-action@master + with: + sdk-version: '6.99.12.4' +``` + +> Note: This action will assume that the Ren'Py project is the repository's root rather than a separate directory. + +**Required Parameters:** + +- `sdk-version`: The version of the Ren'Py SDK to use while building. Will default to `7.3.2` if none is found. + +### Outputs + +- `dir`: The directory where the files were built to. +- `version`: The name of the project and version that was built. Often useful in cases where you don't know the version. diff --git a/action.yml b/action.yml index 35c24a1..b579304 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,11 @@ inputs: description: "The version of the Ren'Py SDK to use" required: true default: '7.3.2' +outputs: + dir: + description: "The directory where the distributed files exist" + version: + description: "The built version of the project" runs: using: 'docker' image: 'Dockerfile' diff --git a/build.sh b/build.sh index 89942b9..b48f6d4 100755 --- a/build.sh +++ b/build.sh @@ -14,3 +14,6 @@ mv ./${sdk_name} ../renpy echo "Building the project..." rm -rf game/README.html ../renpy/renpy.sh ../renpy/launcher distribute . +built_dir=$(ls | grep -dists) +echo ::set-output name=dir::$built_dir +echo ::set-output name=version::${build_dir#'-dists'}