diff --git a/README.md b/README.md index 316f13e..08f964a 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,92 @@ Your library folder should look like this: |- load_in_lua.so ``` +## With [Love actions bare package](https://github.com/marketplace/actions/love-actions-bare-package) and [Love actions for testing](https://github.com/marketplace/actions/love-actions-for-testing) + +```yml +env: + BUILD_TYPE: ${{ fromJSON('["dev", "release"]')[startsWith(github.ref, 'refs/tags/v')] }} + CORE_LOVE_PACKAGE_PATH: ./core.love + CORE_LOVE_ARTIFACT_NAME: core_love_package + PRODUCT_NAME: my_love_app + BUNDLE_ID: com.example.myloveapp + +jobs: + build-core: + runs-on: ubuntu-latest + env: + OUTPUT_FOLDER: ./build + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Build core love package + uses: love-actions/love-actions-core@v1 + with: + build-list: ./media/ ./parts/ ./Zframework/ ./conf.lua ./main.lua ./version.lua + package-path: ${{ env.CORE_LOVE_PACKAGE_PATH }} + - name: Upload core love package + uses: actions/upload-artifact@v3 + with: + name: ${{ env.CORE_LOVE_ARTIFACT_NAME }} + path: ${{ env.CORE_LOVE_PACKAGE_PATH }} + auto-test: + runs-on: ubuntu-latest + needs: build-core + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Love actions for testing + uses: love-actions/love-actions-test@v1 + with: + font-path: ./parts/fonts/proportional.otf + language-folder: ./parts/language + build-linux: + runs-on: ubuntu-latest + needs: [build-core, auto-test] + env: + OUTPUT_FOLDER: ./build + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + # Download your core love package here + - name: Download core love package + uses: actions/download-artifact@v3 + with: + name: ${{ env.CORE_LOVE_ARTIFACT_NAME }} + # This is an example dynamic library + - name: Download ColdClear + uses: ./.github/actions/get-cc + with: + platform: Linux + dir: ./ColdClear + # Notice the subdir /lua/5.1 + - name: Process ColdClear + shell: bash + run: | + cd ./ColdClear + mkdir -p ./lib/lua/5.1 + mv ./x64/CCloader.so ./lib/lua/5.1 + - name: Build Linux packages + id: build-packages + uses: love-actions/love-actions-linux@v1 + with: + desktop-file-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/template.desktop + executable-name: app + icon-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png + love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }} + lib-path: ./ColdClear/lib + product-name: ${{ env.PRODUCT_NAME }} + output-folder: ${{ env.OUTPUT_FOLDER }} + - name: Upload AppImage artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ needs.get-info.outputs.base-name }}_Linux_AppImage + path: ${{ env.OUTPUT_FOLDER }}/${{ env.PRODUCT_NAME }}.AppImage +``` + ## All inputs | Name | Required | Default | Description |