Skip to content

Conversation

FranzBusch
Copy link
Member

@FranzBusch FranzBusch commented Aug 12, 2025

Motivation

Currently the build plugin distributed from swift-protobuf and other repos that offer protoc plugins such as grpc-swift, are hardly usable since they require the user to install protoc and then point SwiftPM or the IDE to its location.

Modifications

This PR adds a new step in our release flow that bundles the upstream protoc binaries into an artifactbundle and uploads them to the latest draft release. It also adds to the release steps to update the Package.swift

Result

We now have an ecosystem wide distributing of protoc that can be used directly from the package manager without requiring users to install it manually. This makes build and command plugins that rely on protoc vastly more useful.

@FranzBusch FranzBusch requested a review from thomasvl August 12, 2025 19:55
@FranzBusch FranzBusch added the 🔨 semver/patch No public API change. label Aug 12, 2025
@FranzBusch FranzBusch force-pushed the fb-protoc-distribution branch from 8e7a583 to f14f281 Compare August 12, 2025 20:00

4. Generate protoc artifact bundle

Once you have created the draft release, trigger the "Upload protoc artifactbundle"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can any person with commit access to the repo do this?

What if we have two SwiftProtobuf releases without a new protobuf release happening, do we skip this step?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can any person with commit access to the repo do this?
Yes

What if we have two SwiftProtobuf releases without a new protobuf release happening, do we skip this step?
Good point. I added a section to check if there is a new release and only then run this.

## Motivation

Currently the build plugin distributed from swift-protobuf and other repos that offer protoc plugins such as grpc-swift, are hardly usable since they require the user to install protoc and then point SwiftPM or the IDE to its location.

## Modifications

This PR adds a new step in our release flow that bundles the upstream protoc binaries into an artifactbundle and uploads them to the latest draft release. It also adds to the release steps to update the `Package.swift`

## Result

We now have an ecosystem wide distributing of protoc that can be used directly from the package manager without requiring users to install it manually. This makes build and command plugins that rely on protoc vastly more useful.
@FranzBusch FranzBusch force-pushed the fb-protoc-distribution branch from f14f281 to 32733d5 Compare August 13, 2025 09:11
@FranzBusch FranzBusch requested a review from thomasvl August 13, 2025 09:11
to reference the new artifact bundle. You'll need to update two things:

- **URL**: Change to point to your new release tag
- **Checksum**: Download the artifact bundle and calculate its SHA256 hash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the right command line to do that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do it via the command line by doing swift package compute-checksum <path> but the GH UI will also show it to you

@FranzBusch FranzBusch merged commit 70f9e85 into apple:main Aug 13, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants