2
2
3
3
---
4
4
5
- When doing a release:
5
+ This document covers two types of releases:
6
+
7
+ 1 . ** Swift Protobuf Library Releases** - New versions of the Swift protobuf library itself
8
+ 2 . ** Protoc Artifactbundle Releases** - Updates to the bundled protoc compiler when new protoc versions are available
9
+
10
+ ## Swift Protobuf Library Releases
11
+
12
+ When doing a Swift Protobuf library release:
6
13
7
14
1 . Examine what has changed
8
15
@@ -48,48 +55,6 @@ When doing a release:
48
55
everything based on the PR descriptions and _ semver_ tags in the repo. Just read
49
56
though was was generate to see if any tweaks are needed.
50
57
51
- ** Important:** Save this as a ** draft** release first (do not publish yet).
52
-
53
- 1 . Generate protoc artifact bundle if needed
54
-
55
- First, check if there have been any new protoc releases since the last
56
- time we bundled protoc. To do this check the binary target protoc version number
57
- in the Package.swift. If there has been a new release of protoc then once you
58
- have created the draft release, trigger the "Upload protoc artifactbundle"
59
- workflow from the [ Actions tab] ( https://github.com/apple/swift-protobuf/actions/workflows/prerelease_protoc_artifactbundle.yml ) .
60
-
61
- This workflow will:
62
- - Fetch the latest stable protoc release from protocolbuffers/protobuf
63
- - Create a Swift Package Manager compatible artifact bundle
64
- - Upload it to your draft release
65
-
66
- Wait for the workflow to complete successfully before proceeding.
67
-
68
- 1 . Update Package.swift with new artifact bundle
69
-
70
- If there was a new protoc release and you uploaded a new artifact bundle in
71
- the previous step. Create a pull request that updates the ` Package.swift ` file
72
- to reference the new artifact bundle. You'll need to update two things:
73
-
74
- - ** URL** : Change to point to your new release tag
75
- - ** Checksum** : Download the artifact bundle and calculate its SHA256 hash
76
-
77
- Example update:
78
- ``` swift
79
- .binaryTarget (
80
- name : " protoc" ,
81
- url : " https://github.com/apple/swift-protobuf/releases/download/[a.b.c]/protoc-X.Y.artifactbundle.zip" ,
82
- checksum : " new-sha256-checksum-here"
83
- ),
84
- ```
85
-
86
- To get the checksum copy it from the Github UI when looking at the draft release.bundle.zip
87
-
88
- 1 . Publish the release
89
-
90
- After the Package.swift PR is merged, return to your draft release and click
91
- _ Publish release_ .
92
-
93
58
1 . Publish the ` SwiftProtobuf.podspec `
94
59
95
60
_ Note:_ You must be an _ owner_ of the pod to do this, see ` pod trunk info SwiftProtobuf `
@@ -101,3 +66,40 @@ When doing a release:
101
66
102
67
_Note:_ This uses that local copy of `SwiftProtobuf.podspec`, but checks
103
68
against the sources on github.
69
+
70
+ ## Protoc Artifactbundle Releases
71
+
72
+ Protoc artifactbundle releases are independent of Swift Protobuf library releases and follow
73
+ a `protoc-vX.Y` naming convention that matches the upstream protoc version.
74
+
75
+ ### Creating a protoc release
76
+
77
+ 1. **Trigger the workflow**
78
+
79
+ Go to the [Actions tab](https://github.com/apple/swift-protobuf/actions/workflows/draft_release_protoc_artifactbundle.yml)
80
+ and manually run the "Draft release protoc artifactbundle" workflow.
81
+
82
+ 2. **What the workflow does automatically**
83
+
84
+ The workflow will:
85
+ - Check the latest protoc version from protocolbuffers/protobuf
86
+ - Check if we already have a matching `protoc-vX.Y` release
87
+ - If versions differ or no release exists:
88
+ - Download protoc binaries for all supported platforms
89
+ - Create a Swift Package Manager compatible artifact bundle
90
+ - Create a new draft release tagged `protoc-vX.Y`
91
+ - Upload the artifactbundle to the draft release
92
+ - If versions match, exit early (no action needed)
93
+
94
+ 3. **Publish the release**
95
+
96
+ After the workflow completes successfully:
97
+ - Go to the [releases page](https://github.com/apple/swift-protobuf/releases)
98
+ - Find the draft `protoc-vX.Y` release
99
+ - Review the release notes and artifactbundle
100
+ - Click "Publish release"
101
+
102
+ 4. **Use in Swift Protobuf**
103
+
104
+ The protoc release is now available with a stable URL that can be referenced
105
+ in `Package.swift`. Create a separate PR to update the reference in the `Package.swift`
0 commit comments