oranda icon indicating copy to clipboard operation
oranda copied to clipboard

audit artifact autodetection for use with go-releaser

Open pomdtr opened this issue 2 years ago • 8 comments

Hi, love your work on this.

I'm considering using this tool for my golang project (https://github.com/pomdtr/sunbeam), however it looks like the installation screen can only be generated for cargo-dist projects.

What are your opinion on adding support for other releasers ?

pomdtr avatar Mar 02 '23 18:03 pomdtr

Hey!

Thank you so much! Do you have binaries or do you have to use the go installer.

If so we also support any package manager

SaraVieira avatar Mar 02 '23 19:03 SaraVieira

Seems there is no test for that whatsoever and the docs are still in progress but you can use:

package_managers: {go: "go install github.com/pomdtr/sunbeam@main"}

Instead of cargo dist true, let me know if there is something i am missing

SaraVieira avatar Mar 02 '23 19:03 SaraVieira

I plan to add binaries using GitHub release, abd brew / snap / aur packages

pomdtr avatar Mar 02 '23 19:03 pomdtr

@pomdtr i know it's been a bit but i'm looking into this and adding support for it- does goreleaser generate a manifest for the assets it builds?

ashleygwilliams avatar Apr 14 '23 18:04 ashleygwilliams

Not sure it is what you are looking for, but goreleaser returns checksum.txt file : see https://github.com/deta/space-cli/releases/tag/v0.3.1

pomdtr avatar Apr 14 '23 18:04 pomdtr

After running goreleaser locally, I found out that it generates an artifacts.json file listing every binaries!

[
    {
        "name": "sunbeam",
        "path": "/Users/achille/Developer/github.com/pomdtr/sunbeam/dist/sunbeam_darwin_arm64/sunbeam",
        "goos": "darwin",
        "goarch": "arm64",
        "internal_type": 4,
        "type": "Binary",
        "extra": {
            "Binary": "sunbeam",
            "Ext": "",
            "ID": "sunbeam"
        }
    },
   // ...
]

pomdtr avatar Apr 17 '23 07:04 pomdtr

@pomdtr !!! this is excellent. having this file will make it very easy for oranda to generate what it needs to. does goreleaser give you an option to also publish that file to github releases?

ashleygwilliams avatar Apr 17 '23 18:04 ashleygwilliams

I'm not sure, but it looks like you can publish extra files in the release step:

image

Here is the link to the doc: https://goreleaser.com/customization/release/

I'm currently tuning the goreleaser setup for sunbeam, i'll take a look!

pomdtr avatar Apr 17 '23 18:04 pomdtr