action-gh-release
action-gh-release copied to clipboard
Cannot disable release body append mechanism when updating an existing release
If you update the release from multiple jobs then the body is appended and the behavior cannot be controlled. Here is where the problem is: https://github.com/softprops/action-gh-release/blob/master/src/github.ts#L171
Why is this a problem?
Some projects need to be built on multiple architectures and multiple operating systems. For example, compile on x64-windows, x86-windows, x64-linux, x64-osx. Such project is run on 4 different jobs, uses a matrix configuration -> each job creates a release with a unique artifact.
What I want to accomplish is to have a single release with multiple binaries for the same architecture with git log as the body of the release. But instead I get this:
My config looks like this:
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.create_changelog.outputs.log }} # comes from "git log"
files: ${{ steps.create_artifact.outputs.path }}
draft: false
prerelease: false
name: Release ${{ steps.get_release_name.outputs.tag }}
tag_name: ${{ steps.get_release_name.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Would it be possible to implement something like this?
with:
append: false
That seems doable, yes
Some projects need to be built on multiple architectures and multiple operating systems. For example, compile on x64-windows, x86-windows, x64-linux, x64-osx. Such project is run on 4 different jobs, uses a matrix configuration -> each job creates a release with a unique artifact.
A few alternatives that require no change to to this action
-
You could leverage
upload
anddownload
artifacts actions. Have multiple jobs that build release artifacts useupload-artifact
then in a separate job that depends on those, download the artifacts and run the gh release action just once -
use an
if
filter to conditionally set release notes for one of your architectures assuming all release notes are the same and an flipped if for the remainder
[...] then in a separate job that depends on those, download the artifacts and run the gh release action just once
That sounds like a good idea. Thanks!
you bet. let me know if you need help on how to structure that
Any update? I really need this feature.
I totally agree. This feature would be great.
@abcfy2 @orhun
The original use case mentioned in this issue is solved by the upload
/ download
pattern.
Is there another motivating use case for this feature?
@abcfy2 @orhun
The original use case mentioned in this issue is solved by the
upload
/download
pattern.Is there another motivating use case for this feature?
Thanks for letting me know. Honestly, I don't remember what I was trying to do at that time (almost a year ago) so I don't really know 🙈
My use case is that my artifacts are large (100Mb - 200Mb each). Having 3 of them will get me over my free 500Mb limit when using upload/download artifacts.
I will use the if statement approach to create release-notes only for one build.