What's Tapestry 🤔
Tapestry helps you with creating and managing your Swift frameworks 💫
Or define your release steps in a type-safe way?
Well, look no further,
tapestry shall help you with exactly that!
Projects Using Tapestry
If you are also leveraging Tapestry in your project, feel free to open a PR to include it in the list above.
These repositories can also serve as a great example configuration for your own projects.
$ mint install AckeeCZ/tapestry
Add this to your
.package(url: "https://github.com/AckeeCZ/tapestry.git", .branch("master")),
Using Swift directly
$ git clone https://github.com/AckeeCZ/tapestry.git $ cd tapestry $ swift run tapestry
Setup release steps
To get you started with tapestry (if you did not generate your framework with it!), you can run
This will create a
TapestryConfig.swift that you can then customize per your needs
To configure your release steps, run:
This opens Xcode with easily editable
The generated file will look like this:
import TapestryDescription let config = TapestryConfig(release: Release(actions: [.pre(.docsUpdate), .pre(.dependenciesCompatibility([.cocoapods, .carthage, .spm(.all)]))], add: ["README.md", "YourLibraryName.podspec", "CHANGELOG.md"], commitMessage: "Version \(Argument.version)", push: false))
You can see lower below how to configure the manifest to your needs.
Release Github Action
Just by adding a simple tapestry step
.post(.githubRelease(owner: "owner", repository: "repository", assetPaths: ["build.zip"]))
you can automate your whole release process with Github actions. If that sounds interesting to you, check out the action here
To then create a new release with github action, simply run
tapestry github-release 0.0.1 and ... that's all! 🙂
To edit the manifest, simply run
That will open Xcode project with that manifest, so you can easily edit the Swift file.
You can use the documentation right in the new Xcode project or you can use the documentation below 👇
This currently only has one argument
release, more will be added here
The main component of the release process.
|actions||Your custom release steps, more about how you can define them below (see
|add||Glob of your files that you want to add to git before releasing a version||[String]||Yes|
|commitMessage||Commit message - use
|push||This option determines if the changes are committed at the end||Bool||No|
tapestry release 0.0.6 also automatically tags the latest commit.
This type lets you define the individual actions.
||Runs before commiting and pushing. Runs the custom command from the root folder.|
||Runs before commiting and pushing. Runs a
||Runs after commiting and pushing. Runs the custom command from the root folder.|
||Runs after commiting and pushing. Runs a
This is a set of predefined actions.
||Creates a new release on github. If you specify
||Updates version in your
||Checks compatibility with given
Note that for
docsUpdate your changelog must be in this format:
## Next - your way of adding logs ## 1.0.0 ....
Which will be changed to
## Next ## 1.0.1 - your way of adding logs ## 1.0.0 ....
To change the version in your
README.md, we use the latest tag in your git history.
You can also try out the individual actions:
tapestry run action docs-update 1.0.0 tapestry run action compatibilty spm carthage cocoapods
Let's you say what dependency managers you want to check compatibility for.
||Runs compatibility check for Cocoapods|
||Runs compatibility check for Carthage|
||Runs compatibility check for SPM - define platform if you are using platform-specific libraries (eg
To generate your project, simply run:
tapestry init --path TapestryProject
You can omit
--path argument and it will generate your framework in the current directory.
You can change the generated files in
InitCommand and your example project in
ExampleModelLoader. In the future, I'd like to make this customization even easier, so watch this space 👀
Generated project features
Swift Package Managercompatibility
travisto automate your builds
Executablesupport for your CLI tools
- ☐ more and even more to come!
You can check out an example project that was generated with
Inspiration and thanks
You may find interesting
Performace, Mint support -
This release brings two things: performance and Mint support.
tapestry should be significantly faster as it does not need a locally built binary.
To migrate to this version, remove
Tapestries folder and move
TapestryConfig.swift to your root directory.
Release configuration -
Adding release configuration, so you can define your release steps in a type-safe way! Check out the updated documentation for more info.
- Release configuration in a type-safe way https://github.com/AckeeCZ/tapestry/pull/8 by @fortmarek