Last updated May 15, 2022
We're trying to imitate trunk-based development. It is pretty simple for our use case with a small caveat: We do not have a release branch as of the moment, but we are starting to tag our releases and manually deploying them to production.
Here is the exact step by steps to release main branch. Please note that the current setup in Vercel no longer automatically deploys to production
Yarn configuration
Here's my yarn config, you need to set version-git-tag to false
You need to update the version on the main branch and then create a new release branch (for hotfixes later).
Instructions:
main branchyarn version --minor → or --patch depending if you're doing a hotfix or cycle releasegit checkout -b releases/<new-version> git push releases/<new-version>git push <new-version> → push the tag.You should see an active preview deployment in Vercel for release/<new-version>
Easy, just promote to production the release branch you created.
Go to the repo's releases (usually just append /releases to the repository root URL). then click the draft a new release. Then you should see this page:
Press "Auto-generate release notes". This will create a pretty standardized release structure.
Instructions
main branchmain branchrelease/<new-patch-version>MacOS
docker buildx build --platform linux/amd64 -t registry.digitalocean.com/typedream/<staging-or-prod>:<version> -f <staging-or-prod>.Dockerfile . docker push <image>:<version>Linux
skaffold build -p [stg/prod]