Before releasing, it is always a good idea to make sure every piece of work in the SDK has been tested and QA'd and is approved for release. It is also a good idea to ensure any dependencies we rely on are also up-to-date.
1- In Configurations/Afterpay-Shared.xcconfig
, update the MARKETING_VERSION
to the number you wish to release. Please follow semantic versioning.
2- Update the versions recommended in the ReadMe Integration Guide. For example, in the instructions for how to integrate with SPM, Carthage, etc, update the versions there.
3- Push all changes to GitHub.
4- In GitHub, go to Releases
and click Draft a new release
. Insert the version number as the tag version. Fill in the rest of details of the release as well with as much detail as you can, particularly noting any breaking changes. GitHub Actions will have already filled in many of the changes for you from pull requests titles, but you will need to make this more human-readable. NB This must be done even if you have already made the Git tag — this way, any release-related GitHub actions will also run. It also gives us a nicer history of our releases.
In order to deploy a library to CocoaPods, it is necessary to push our Afterpay.podspec
file. This is handled automatically by a GitHub Action. Whenever you make a new release tag in GitHub, this Action will deploy the podspec to the CocoaPods Trunk for you.
The GitHub Action needs a COCOAPODS_TRUNK_TOKEN
to be set. This is the secret token which authenticates us with CocoaPods. To get this register with CocoaPods and then be added as a contributor.
This blog post outlines a similar procedure.
Swift Package Manager and Carthage require no additional work. Those package managers will automatically start receiving the new version when they can.