Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow to pass tags to wails build command #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ By default, the action will build and upload the results to github, on a tagged
| `sign` | `false` | After build, signs and creates signed installers |
| `package` | `true` | Upload workflow artifacts & publish release on tag |
| `build-platform` | `darwin/universal` | Platform to build for |
| `build-tags` | '' | Build tags to pass to Go compiler. Must be quoted. |
| `wails-version` | `latest` | Wails version to use |
| `wails-build-webview2` | `download` | Webview2 installing [download,embed,browser,error] |
| `go-version` | `1.18` | Version of Go to use |
| `node-version` | `16.x` | Node js version |
| `deno-build` | `` | Deno compile command |
| `deno-build` | '' | Deno compile command |
| `deno-working-directory` | `.` | Working directory of your [Deno](https://deno.land/) server|
| `deno-version` | `v1.20.x` | Deno version to use |
| `sign-macos-app-id` | '' | ID of the app signing cert |
Expand Down
14 changes: 9 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
description: "Platform to build for"
required: false
default: "darwin/universal"
build-tags:
description: "Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"
required: false
default: ""
wails-version:
description: "Wails version to use"
required: false
Expand Down Expand Up @@ -140,22 +144,22 @@ runs:
- name: Build App
if: inputs.build == 'true' && runner.os == 'macOS'
working-directory: ${{ inputs.app-working-directory }}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}} -tags '${{inputs.build-tags}}'
shell: bash
- name: Build App
if: inputs.build == 'true' && runner.os == 'Linux'
working-directory: ${{ inputs.app-working-directory }}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}} -tags '${{inputs.build-tags}}'
shell: bash
- name: Build Windows App
if: inputs.build == 'true' && runner.os == 'Windows' && inputs.nsis == 'false'
working-directory: ${{ inputs.app-working-directory }}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -o ${{inputs.build-name}} -tags '${{inputs.build-tags}}'
shell: bash
- name: Build Windows App + Installer
if: inputs.build == 'true' && runner.os == 'Windows' && inputs.nsis == 'true'
working-directory: ${{ inputs.app-working-directory }}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -nsis -o ${{inputs.build-name}}
run: wails build --platform ${{inputs.build-platform}} -webview2 ${{inputs.wails-build-webview2}} -nsis -o ${{inputs.build-name}} -tags '${{inputs.build-tags}}'
shell: bash
- name: Add macOS perms
if: inputs.build == 'true' && runner.os == 'macOS'
Expand Down Expand Up @@ -217,7 +221,7 @@ runs:
env:
APPLE_PASSWORD: ${{ inputs.sign-macos-apple-password }}
run: |
gon -log-level=info ${{ inputs.app-working-directory }}/build/darwin/gon-notarize.json
gon -log-level=info ${{ inputs.app-working-directory }}/build/darwin/gon-notarize.json
# Windows signing
- name: Sign Windows binaries
shell: powershell
Expand Down