Produce an artifactbundle when making releases #67
Merged
liamnichols merged 4 commits intomainCreateAPI/CreateAPI:mainfrom Jul 30, 2022
Merged
Produce an artifactbundle when making releases #67liamnichols merged 4 commits intomainCreateAPI/CreateAPI:mainfrom
liamnichols merged 4 commits intomainCreateAPI/CreateAPI:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Links
Background
When creating and using Swift Package plugins, there are a couple of ways that you can approach it:
.binaryTargetdependencyThe second option is great when you don't want to have to concern yourself with potentially complex build pipelines for the build tools given that usually we work with precompiled binaries.
To do this, the vendor needs to provide an artifactbundle as described in [SE-0305](https://github.com/apple/swift-evolution/blob/main/proposals/0305-swiftpm-binary-target-improvements.md).
Changes
In this Pull Request, I do a few things to introduce the bundle:
make buildso that it produces a universal binary that works on Intel or Apple Silicon Macsmake artifactbundle version={VERSION}stepThere is still one last manual step, which is to look for the .zip file SHA in the build log and add it to the release notes, but since writing the release notes remains manual still (I like GitHub's generated contents), I will keep this manual for the time being.
For reference, this enables users of CreateAPI start writing Package.swift files like this:
Package.swift
And then adding their own plugin like so
Plugins/CreateAPI/Plugin.swift
Before documenting this, I want to try it out for myself a bit and work out where we need to improve things and what works best since there are a few different approaches that can be used when writing plugins. After merging this and getting a release out though, I'll certainly share some instructions back in the linked ticket.