tauri-action icon indicating copy to clipboard operation
tauri-action copied to clipboard

ability to specify a target

Open Niedzwiedzw opened this issue 3 years ago • 7 comments

      - name: install app dependencies and build it
        run: yarn && yarn build
      - uses: tauri-apps/tauri-action@dev
        with:
          tauriScript: yarn tauri build --target ${{ matrix.target }}

produces this


Run tauri-apps/tauri-action@dev
running yarn [ 'tauri', 'build', '--target', 'i686-pc-windows-msvc', 'build' ]
error: Found argument 'build' which wasn't expected, or isn't valid in this context

this feature is needed for building for 32 windows (surprisingly large user base)

Niedzwiedzw avatar Apr 05 '22 16:04 Niedzwiedzw

For reference: https://github.com/tauri-apps/tauri-action/blob/dev/packages/core/index.ts#L357

We handle tauriScript in a really weird way currently. Like the usage the readme shows doesn't work.

FabianLars avatar Apr 05 '22 16:04 FabianLars

What's the correct usage? 🤔

goenning avatar Jul 10 '22 12:07 goenning

@goenning use args (undocumented) instead of tauriScript

with:
  args: --target ${{ matrix.target }}

FabianLars avatar Jul 10 '22 13:07 FabianLars

@FabianLars I guess for now we can update the documentation so people doesn't get confused? Do you mind if I add some notes in the README?

stevenhansel avatar Jul 27 '22 08:07 stevenhansel

sure, go ahead!

FabianLars avatar Jul 27 '22 08:07 FabianLars

@FabianLars I already opened the PR, but I would like to know what's the real purpose of the tauriScript option? I would like to help to fix it.

stevenhansel avatar Jul 28 '22 13:07 stevenhansel

At this point i'm not so sure anymore either haha. In theory it's supposed to do what's described in Caveats:

You can run custom Tauri CLI scripts with the tauriScript option. So instead of running yarn tauri build or npx tauri build, we'll execute ${tauriScript}. Useful when you need custom build functionality when creating Tauri apps e.g. a desktop:build script.

But i think we're at a point where we may have to rethink the whole action before trying to fix this.

FabianLars avatar Jul 28 '22 14:07 FabianLars