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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how does this action handle multi-line release notes? #28

Open
tonyarnold opened this issue Sep 16, 2020 · 9 comments
Open

Question: how does this action handle multi-line release notes? #28

tonyarnold opened this issue Sep 16, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@tonyarnold
Copy link
Contributor

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.

@wzieba
Copy link
Owner

wzieba commented Sep 16, 2020

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!

@wzieba wzieba added the enhancement New feature or request label Sep 16, 2020
@VladSumtsov
Copy link

Hi! Do you have any updates on this? :)

@wzieba
Copy link
Owner

wzieba commented Mar 21, 2021

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.

@sgurdag
Copy link

sgurdag commented Jun 23, 2021

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.

@tonyarnold
Copy link
Contributor Author

@sgurdag that's an interesting bit of info - does it work if you push through a multi-line string as per this issue?

@sgurdag
Copy link

sgurdag commented Jun 24, 2021

@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:

Screenshot 2021-06-24 at 20 46 41

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

@tonyarnold
Copy link
Contributor Author

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.

@p-fischer
Copy link

@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

@p-fischer
Copy link

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 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants