connectrpc / connect-swift

The Swift implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/docs/swift/getting-started
Apache License 2.0
93 stars 18 forks source link

Publish plugin artifact for external plugin usage #101

Closed kohenkatz closed 1 year ago

kohenkatz commented 1 year ago

(Based on https://github.com/bufbuild/connect-kotlin/issues/4)

Currently, the plugin is only published to the BSR. It would be nice for users of Connect-Swift to also be able to consume the plugin independently from the BSR.

Unlike Android which has multiple options for publishing the plugin (via maven or GH releases), Swift doesn't have a central repository, so I think GH releases are the most logical way to do it.

rebello95 commented 1 year ago

👋🏽 @kohenkatz - thanks for filing this. I assume you're asking for zipped executables for protoc-gen-connect-swift and protoc-gen-connect-swift-mocks to be attached to GitHub releases, may I ask how you're invoking the plugin? (Is it locally using protoc?)

kohenkatz commented 1 year ago

I assume you're asking for zipped executables for protoc-gen-connect-swift and protoc-gen-connect-swift-mocks to be attached to GitHub releases

Yes, that's exactly what I'd like, similar to how grpc-swift packages their generators https://github.com/grpc/grpc-swift/releases/tag/1.14.1 (and you already do this for the buf executable too).

may I ask how you're invoking the plugin? (Is it locally using protoc?)

I'm using the buf executable locally in GitLab CI. We build our .proto files for Go, JavaScript, Kotlin, and Swift, and then create packages for all of them so we can use them in our apps. (Go and Swift packages are just git tags, Kotlin and JavaScript use GitLab's built-in package registry for maven and npm respectively.)

At some point soon, I plan to open-source my build scripts, but I don't have time at the moment.

rebello95 commented 1 year ago

Got it. Thank you for the details! I'll look into this next week 👍🏽

rebello95 commented 1 year ago

Once this lands, artifacts will automatically be added whenever a new release is tagged: https://github.com/bufbuild/connect-swift/pull/113