taiki-e / upload-rust-binary-action

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

include markdown file as PDF format in assets #12

Closed xudesheng closed 2 years ago

xudesheng commented 2 years ago

Is there a way to upload a markdown file in pdf format separately or in the zip/tar file with bin together?

taiki-e commented 2 years ago

It would definitely make sense to add the ability to upload other files in the same archive or separately. (Related: #2, #1)

I'm not sure if markdown to PDF conversion should belong to this project, but I think once the above functionality is implemented, it will be easily available in combination with external commands or other Github action.

- run: ... # external command to convert README.md to PDF and save as README.pdf
- uses: taiki-e/create-gh-release-action@v1
  with:
    # files to include in archive
    include: README.pdf
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Hunlongyu commented 2 years ago

Can't use include yet? I added this attribute, but it didn't take effect, and there was an warn. image

image

Hunlongyu commented 2 years ago

Or can I not compress the program on Windows platform。

I want get xx.exe not xx.zip

taiki-e commented 2 years ago

The basic implementation of include input option is in #17.

Or can I not compress the program on Windows platform。

I want get xx.exe not xx.zip

https://github.com/taiki-e/upload-rust-binary-action/issues/6 is a tracker for this.

Hunlongyu commented 2 years ago

my dir image

I try these:

with:
  bin: electron-icon-builder

  include:electron-icon-builder.exe
or
  include: target/release/electron-icon-builder.exe
or
  include: /target/release/electron-icon-builder.exe
or
  include: README.md

image

I can't get electron-icon-builder.exe or README.md

How can I write code to get the electron-icon-builder.exe file and upload it to release correctly.

My github actions workfows release.yml, link

taiki-e commented 2 years ago

I can't get electron-icon-builder.exe or README.md

I believe both are included in the zip file (electron-icon-builder-x86_64-pc-windows-msvc.zip).

As mentioned above, uploading with no archive is not yet supported and is tracked in issue #6.

Hunlongyu commented 2 years ago

emmmm......

image

I got README.md in zip

But I want get this: image

Because I don't want to compress exe files

taiki-e commented 2 years ago

@Hunlongyu As of 1.7.0 (#23), the following should work.

      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: electron-icon-builder
          asset: README.md,target/release/electron-icon-builder.exe
          zip: none
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
       if: matrix.os == 'windows-latest'