Open tonyarnold opened 4 years ago
It doesn't look like this action does anything to help here, but I was thinking maybe it should?
That's true, I didn't pay attention to multi-line release notes. For sure it's good idea, I will check the possibilities. Thanks for rising* this issue!
Hi! Do you have any updates on this? :)
hi @VladSumtsov 👋 no, sorry I didn't prioritize it - I don't have any updates on this. I'll happily welcome any PR but for now, I don't have enough time to do this myself.
Here is how i do it :
releaseNotes: |+
Initiated by **${{github.actor}}** --- **Github Actions**
- ${{github.workflow}}
- ${{github.ref}}
- Build (${{github.run_number}})
The magic is starting with |+
. Then each line in yaml file will be shown in new line in AppCenter.
@sgurdag that's an interesting bit of info - does it work if you push through a multi-line string as per this issue?
@sgurdag that's an interesting bit of info - does it work if you push through a multi-line string as per this issue?
Hey @tonyarnold, Yes,It does. You can see my release note on appcenter here:
It is the way of having multi-lines in YAML as it is explicitly mentioned in syntax doc here : https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
I'm dubious about whether this will work with a multi-line replacement like ${{github.event.release.body}}
— I'll have to give it a try for my next beta release.
@tonyarnold I tested this with a multi-line replacement. See this snippet:
releaseNotes: |
${{ steps.extract-release-notes.outputs.release_notes }}
Unfortunately, it didn't work.
Another good and clean solution to support multi-line release notes would be to provide the release notes in a file and to support the CLI parameter release-notes-file
Update: The approach can work. It failed in my test because the release notes started with -
.
However, if they don't start with a minus it does work.
I worked around the limitation by adding a title in the YAML-config:
releaseNotes: |+
Release notes:
${{ steps.extract-release-notes.outputs.release_notes }}
I've been calling the AppCenter CLI tool directly, and attempting to use the contents of
${{github.event.release.body}}
to populate my release notes, however it appears that I need to do some pre-processing to convert the newlines/special characters to something more appropriate for use on the command line.It doesn't look like this action does anything to help here, but I was thinking maybe it should?
Something simple to pre-process the incoming release notes text, or wrap the argument contents in a multiline argument directly would be super helpful.