Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
115 lines (79 loc) · 3.84 KB

release-procedure.adoc

File metadata and controls

115 lines (79 loc) · 3.84 KB

SDK Release Documentation

The release process results in new versions packages being published on npm. The version numbers on all modules must always be the same.

How Releases Work

The release process takes place via Github Actions. GH actions notices a new release being created and kicks off a special release workflow. The following steps take place:

  • A standard build job runs, i.e. the code is built and tested.

  • If the build is successful then a release job runs.

    • The each individual SDK is built and tested

    • Each individual module is published on npm.

A small amount of preparation needs to take place before this process kicks off. Version numbers need to be updated accordingly using the scripts provided.

How to Prepare a Release

Ensure the Git repository is clean and there are no outstanding changes.

Next, check to ensure that templates-1.0.0 branch is up to date with master. In the following example upstream = git@github.com:aerogear/graphback.git.

git checkout templates-1.0.0
git reset --hard upstream/master
git push -f

Once this is complete you can check out a new branch.

git checkout -b release-x.y.z

From the root directory run the prep-release script.

npm run release:prep

This script will interactively prompt you and ask what version you would like to update to. Select the appropriate version according to Semver.

lerna info version 2.9.0
lerna info current version 0.0.0
lerna info Checking for updated packages...
lerna info Comparing with initial commit.
lerna info Checking for prereleased packages...
? Select a new version (currently 0.0.0) Patch (0.0.1)



? Are you sure you want to publish the above changes? Yes
Repository is ready for release.

Preparing a Pre Release

Prepare a pre-release by adding a suffix to the end of the release tag. Examples of valid pre-release tags:

  • 0.1.2-rc1

  • 0.1.2-SNAPSHOT.0

  • 0.1.2-alpha

If you choose to use a pre-release tag, the publish scripts later on will publish the packages using a next tag.

This means that npm install @aerogear/<package>@next will install your new prerelease, while npm install @aerogear/<package> will still publish the latest regular release.

Commit the Changes

Use git status to verify that the version numbers in the correct files have been updated. This includes the version attribute in the plugin.xml files for packages that contain cordova plugins.

$ git status
On branch release-x.y.z
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   lerna.json
        modified:   packages/auth/package.json
        modified:   packages/core/package.json
        modified:   packages/metrics-cordova/package.json
        modified:   packages/metrics-cordova/plugin.xml

Commit and push these changes, then open a Pull Request to master.

git commit -am 'release version x.y.z'

Once your changes have been merged to master, you can continue and release to npm.

Updating core peer dependency

Each service package currently depends on core package using peerDependency. This dependency is not updated using automatic release scripts. If you have made any changes in core that are breaking API peerDependency needs to be changed manually for those packages.

How to Release

To kick off a release to npm, simply Create a Release in Github. You must use the exact tag you used earlier or the release will fail.

This will kick off the automatic release process in Github actions.

If you prepared a pre-release it is good practice to click the checkbox in Github to indicate this is a pre-release.