Cannot disable release body append mechanism when updating an existing release
See original GitHub issueIf 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top GitHub Comments
That seems doable, yes
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 onceuse 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 remainderMy 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.