Although not very tricky, the Ember Data release process does have a few manual steps. The following steps navigate us through some of the release gotchas and will hopefully result in a successful release.
There are four release channels, lts
, release
, beta
and canary
.
Each has it's own guide below.
In this guide, we are assuming that the remote origin
is [email protected]:emberjs/data.git
In order to release ember-data
you must first ensure the following things:
- You have
commit
rights toember-data
on GitHub - You have an account on
npm
and belongs to theember-data
organization on NPM - You have
publish
rights within theember-data
organization on NPM - You have configured your NPM account to use
2fa
(two factor authentication) - You have installed
lerna
yarn
andnode
globally
When releasing more than one channel, we release from "most stable" to "least stable"
lts
(Most Stable)release
beta
canary
(Least Stable)
Once you have finished this release process, we recommend posting an announcement to Twitter the Crosslinking the announcement to the following Discord channels.
-
Checkout the correct branch
a. For the first release of a new
LTS
, create a new branch fromorigin/release
DO THIS PRIOR TO PUBLISHING THE NEXT RELEASE
git fetch origin; git checkout -b lts-<majorVersion>-<minorVersion> origin/release;
b. For subsequent releases of this
LTS
, ensure your local branch is in-sync with the remote.git fetch origin; git checkout -b lts-<majorVersion>-<minorVersion>; git reset --hard origin/lts-<majorVersion>-<minorVersion>;
-
Generate the Changelog
The Changelog is generated with lerna-changelog.
The primary task prior to generating the changelog is confirming that all pull requests that have been merged since the last release have been labeled with the appropriate lerna-changelog labels and the titles have been updated to ensure they represent something that would make sense to our users. Some great information on why this is important can be found at keepachangelog.com, but the overall guiding principle here is that changelogs are for humans, not machines.
For the first release of an LTS, previous-version
will be the last released version of the release
channel.
For subsequent versions it will be whatever version number we previously published for this LTS.
To actually generate the changelog, run:
yarn lerna-changelog --from=PREVIOUS_VERSION_TAG
Note: if it is the first time that you use lerna-changelog, you might have to add a token to fetch from Github API: https://github.com/lerna/lerna-changelog#github-token
Then:
- insert lerna-changelog output to
CHANGELOG.md
underneath the document title - commit the changelog and push the change upstream:
git add CHANGELOG.md;
git commit -m "Update Changelog for v<new-lts-version>"
git push origin lts-<majorVersion>-<minorVersion> // Note: alternatively, you can make a PR to lts-<majorVersion>-<minorVersion> to make sure there are no errors
-
Publish the LTS
node ./scripts/publish.js lts
-
Update the Release Notes on Github
- Visit Ember Data Releases
- Click on the "Tags"
- Click on the tag just published
- Edit the tag, adding a meaningful title and attaching the changelog (see other releases for examples)
- Publish the release!
-
Checkout the
release
branch and ensure it is in-sync withorigin/release
.DO NOT WORK FROM A LOCAL
release
branch THAT DIFFERSa. If this is the first
release
release of the cycle, we "cut" frombeta
.DO THIS PRIOR TO PUBLISHING THE NEXT BETA
git checkout release; git fetch origin; git reset --hard origin/beta; git push origin release -f;
b. For subsequent
release
releases during the cycle, we release from therelease
branch.git checkout release; git fetch origin; git reset --hard origin/release;
-
Update associated lockstep dependencies
For our first release of the cycle only, we must also update our test harness:
a. ensure that the
ember-source
version inpackage.json
and relevantpackages/
matches only the minor range for theember-data
version we are releasingE.G.
"ember-data": "3.4.1"
should have"ember-source": "~3.4.0"
. For betas/canary, pointing at the last minor release is OK.See emberjs#5607 for the importance of this step.
b. ensure that the last two LTS releases of Ember (and only the last two) are included in
ember-try.js
.See emberjs#5607 for the importance of this step.
c. ensure the same for
azure-pipelines.yml
d. ensure the same for.github/workflows/main.yml
-
Delete the Beta Changelog
If this is the first stable release for this major/minor, in
CHANGELOG.md
delete thebeta
version entries associated with this release. -
Generate the Changelog
IT IS IMPORTANT THAT ALL CHANGES ARE ON THE REMOTE BRANCH SPECIFIED BY HEAD
previous-version
will be whatever version we previously published as arelease
PRIOR_VERSION=<previous-version> HEAD=release ./bin/changelog
-
prepend a new section title for this version with Today's date to
CHANGELOG.md
-
insert changelog script output to
CHANGELOG.md
underneath this new section title -
edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes, non-code changes, etc.)
-
commit the changelog and push the change upstream
git add CHANGELOG.md; git commit -m "Update Changelog for v<new-version>"; git push origin release;
Note it is prudent to make a PR to release to make sure there are no errors.
```
git add CHANGELOG.md;
git commit -m "Update Changelog for v<new-version>";
git push origin name/release-new-version;
-
Publish the release
node ./scripts/publish.js release
-
Update the Release Notes on Github
- Visit Ember Data Releases
- Click on the "more recent tags"
- Click on the tag just published
- Edit the tag, adding a meaningful title and attaching the changelog (see other releases for examples)
- Publish the release!
-
Checkout the
#beta
branch and ensure it is in-sync withorigin/beta
.DO NOT WORK FROM A LOCAL
beta
branch THAT DIFFERSa. If this is the first
beta
release of the cycle, we "cut" from#master
.DO THIS PRIOR TO PUBLISHING THE NEXT CANARY
git checkout beta; git fetch origin; git reset --hard origin/master; git push origin beta -f;
b. For subsequent
beta
releases during the cycle, we release from the beta branch.git checkout beta; git fetch origin; git reset --hard origin/beta;
-
Generate the Changelog
IT IS IMPORTANT THAT ALL CHANGES ARE ON THE REMOTE BRANCH SPECIFIED BY HEAD
PRIOR_VERSION=<previous-beta-version> HEAD=beta ./bin/changelog
-
prepend a new section title for this version with Today's date to
CHANGELOG.md
-
insert changelog script output to
CHANGELOG.md
underneath this new section title -
edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes, non-code changes, etc.)
-
commit the changelog and push the change upstream
git add CHANGELOG.md; git commit -m "Update Changelog for v<new-beta-version>"; git push origin beta;
Note it is prudent to make a PR to beta to make sure there are no errors.
```
git add CHANGELOG.md;
git commit -m "Update Changelog for v<new-beta-version>";
git push origin name/beta-new-beta-version;
-
Publish the weekly beta
node ./scripts/publish.js beta
-
Update the Release Notes on Github
- Visit Ember Data Releases
- Click on the "more recent tags"
- Click on the tag just published
- Edit the tag, adding a meaningful title and attaching the changelog (see other releases for examples)
- Click pre-release for beta releases
- Publish the release!
-
Checkout the
#master
branch and ensure it is in-sync withorigin/master
.DO NOT WORK FROM A LOCAL
master
branch THAT DIFFERSgit checkout master; git fetch origin; git reset --hard origin/master
-
Publish the nightly.
a. If this is the very first
canary
release for a new minornode ./scripts/publish.js canary --bumpMinor
b. If this is the very first
canary
release for a new majornode ./scripts/publish.js canary --bumpMajor
c. For all other "nightly" canary releases
node ./scripts/publish.js canary
Congrats, you are finished!
New canary versions are published to npm every Wednesday at 12pm PST by the Alpha Release
GitHub action.
It will always increment the pre-release version of what's currently in lerna.json
. For example from 3.25.0-alpha.1
to 3.25.0-alpha.2
. It requires a human to manually bump minor and major versions and publish.
To try out the script that will be executed in the GitHub action, use:
node scripts/publish.js canary --dryRun --force --skipSmokeTest
. The --dryRun
param will skip auto committing the
version change and publishing.