taiki-e / upload-rust-binary-action

GitHub Action for building and uploading Rust binary to GitHub Releases.
Apache License 2.0
246 stars 22 forks source link

build error: requires at least 2 arg(s), only received 1 #41

Closed ostoe closed 1 year ago

ostoe commented 1 year ago

Hi~ when i push my code to trigger the gitflow, i receive the error :

requires at least 2 arg(s), only received Error: Command failed: bash --noprofile --norc /home/runner/work/_actions/taiki-e/upload-rust-binary-action/v1/main.sh

Did i do something wrong? Please help me, Ths!

relevant yml:

      - name: "Upload Binaries"
        uses: "taiki-e/upload-rust-binary-action@v1"
        with:
          bin: ${{ needs.get-tag.outputs.bin-name }} 
          target: ${{ matrix.target }}
          archive: $bin-${{ matrix.target }}
          tar: none
          ref: refs/tags/v${{ needs.get-tag.outputs.pkg-version }}
          token: ${{ secrets.GITHUB_TOKEN }}
taiki-e commented 1 year ago
          tar: none

The default for tar option is unix and the default for zip option is windows. In the current implementation, even if you set tar option to none, zip option is not automatically changed to all [^1], so I think you need to specify zip: all option.

[^1]: I think we can improve the behavior on this, but silent conversion to all may make it difficult to support other compressed formats in the future, so it would make sense to make an explicit error for now.

ostoe commented 1 year ago

Thank you for your reply, I understand what you mean, but if I want to upload directly without any packaging or compression, how should I configure it, or whether it is currently supported?

taiki-e commented 1 year ago

"no archive" is not yet officially supported (https://github.com/taiki-e/upload-rust-binary-action/issues/6 is tracking issue for it), but it may be possible to work around that limitation by using the asset option.