Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,25 @@ inputs:
description: "Build a Windows Installer"
required: false
default: "false"
upx:
description: "Compress the build using upx, the Ultimate Packer for eXecutables."
required: false
default: "false"
upx-flags:
description: "Flags to pass to upx compress tool"
required: false
default: ""
build-name:
description: "The name of the binary file"
required: true
build-cache:
description: "Cache the build"
required: false
default: "true"
build-dependency-path:
description: "Used to specify the path to a dependency file - go.sum"
required: false
default: "go.sum"
build-platform:
description: "Platform to build for"
required: false
Expand Down Expand Up @@ -154,6 +166,12 @@ runs:
if ${{ inputs.nsis == 'true' }}; then
build_options+=' -nsis'
fi
if ${{ inputs.upx == 'true' }}; then
build_options+=' -upx'
if [[ "${{ inputs.upx-flags }}" != "" ]]; then
build_options+=" -upxflags='${{ inputs.upx-flags }}'"
fi
fi
echo "BUILD_OPTIONS=$build_options" >> "$GITHUB_OUTPUT"
# Setup and configure GoLang
- name: Setup GoLang
Expand All @@ -162,7 +180,7 @@ runs:
with:
check-latest: true
cache: ${{ inputs.build-cache }}
cache-dependency-path: 'go.sum'
cache-dependency-path: ${{ inputs.build-dependency-path }}
go-version: ${{ inputs.go-version }}
- name: Install Garble
if: inputs.build-obfuscate == 'true'
Expand All @@ -181,6 +199,12 @@ runs:
shell: bash
working-directory: ${{inputs.deno-working-directory}}
run: ${{inputs.deno-build}}
# install upx
- name: Install UPX
if: inputs.upx == 'true'
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
# install wails
- name: Install Wails
if: inputs.build == 'true' && inputs.wails-dev-build == 'false'
Expand Down