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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Support asset properties labeland mime-type #394

Open
Guts opened this issue Nov 8, 2023 · 0 comments
Open

[Feature request] Support asset properties labeland mime-type #394

Guts opened this issue Nov 8, 2023 · 0 comments

Comments

@Guts
Copy link

Guts commented Nov 8, 2023

Firstly, thanks you for your action which is very useful 馃檹.

Referring to the GitHub API documentation related to release publishing, it's possible to customize a label and mime-type (through content-type I guess) per asset: https://docs.github.com/fr/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset.

Content-type was supported by the unmaintained https://github.com/actions/upload-release-asset

On implementation's side, sadly I don't have any idea about how to achieve this. Some thoughts then.

Maybe using the files multilines input introducing a separator inline that allow the action split values like name|mime-type|label:

- name: Release
  uses: softprops/action-gh-release@v1
  if: startsWith(github.ref, 'refs/tags/')
  with:
    files: |
      Release.txt|text/plain|Changelog
      binary_win32.exe|application/vnd.microsoft.portable-executable|AwesomeTool for Windows
      binary_linux| application/zip|AwesomeTool for Linux
      binary_macos.zip|application/zip|AwesomeTool for MacOS

But it might be kinda delicate. So, maybe switching to an array of objects:

- name: Release
  uses: softprops/action-gh-release@v1
  if: startsWith(github.ref, 'refs/tags/')
  with:
    files:
      - name: Release.txt
        mimetype: text/plain
        label: Changelog
      - name: binary_win32.exe
        mimetype: application/vnd.microsoft.portable-executable
        label: AwesomeTool for Windows
      - name: binary_linux
        mimetype: application/zip
        label: AwesomeTool for Linux
      - name:  binary_macos.zip
        mimetype: application/zip
        label: AwesomeTool for MacOS
Guts added a commit to Guts/qgis-deployment-cli that referenced this issue Nov 8, 2023
Because names are used in upgrade command to retrieve the matching
operating system release's asset.

I've created an issue in the GitHub Action used to publish to GitHub
Release to set label property:
softprops/action-gh-release#394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant