1.8 KiB
Releasing
(Note: This document is a reference for people with push access to Moya and to CocoaPods.)
Before release
Releasing a new version of Moya has been automated as much as possible. There are a few prerequisite steps:
- Generate a GitHub personal access token
- Run the following command:
echo "machine api.github.com login {GITHUB_LOGIN} password {GITHUB_TOKEN}" > ~/.netrc
Where {GITHUB_LOGIN} is your GitHub login and {GITHUB_TOKEN} is your personal access token generated in step 1 (or if you had one before). Example:
echo "machine api.github.com login ashfurrow password dc14e6ac2b871e7630f56df3d57d2694b576316a" > ~/.netrc
This lets the automated release script access the GitHub API authorized as you.
- Then run
chmod 600 ~/.netrc. - Make sure you have a registered CocoaPods session. To do that you can run command:
pod trunk me
If you see an error command that you do not have registered session, run command below:
pod trunk register you@youremailaddress.com
Release
(Note: To make a release, you need at least one entry in the Next section of the changelog.)
To make a release:
- Pull latest from master and make sure your git is clean (the script will fail if it's not).
- Run
rake release["X.Y.Z"]. (If you use ZSH, userake release\["X.Y.Z"\]) - Grab a 🍵 or ☕.
- Make sure everything went smoothly.
What you'll need to do manually afterwards (if you released a major version):
- Update the Swift Package Manager instructions in the Readme to use the release you just made public.
If anything goes wrong, don't panic! Get in touch with someone else who has released, or Ash.