Release of new versions is managed by GitHub Actions. On pushes to the master
branch, prerelease versions
are automatically produced. Latest releases are triggered manually through the GitHub release tool.
After creating a release there, Actions will automatically produce a latest version of the package.
- To NOT release anything on a push to
master
, add[skip ci]
to your commit message. - To release
beta
, just push tomaster
. If it breaks with aVersion already exists error
increment version inpackage.json
and push again. - To release
latest
, go to releases on GitHub, draft and publish a release. If you don't know how, read below.
On each push to the master
branch, a new prerelease version is automatically built and published
by GitHub Actions. To skip the process, add [skip ci]
to your commit message.
- Actions build is triggered by a push to
master
(typically a merge of a PR). - Actions lint the source code and run tests in Node.js 10, 12 and 14.
- If all is well, a new prerelease version is published to NPM (
${VERSION}-beta.${COUNTER}
), whereVERSION
is the version in package.json andCOUNTER
is a zero based index of existing prereleases. Example:0.15.1-beta.3
. - The package is tagged with the
beta
NPM tag and a Git tag is associated with the triggering commit. - A build of Apify docker images is triggered that updates the
beta
packages to use the newly published package. - All done and ready to use.
When releasing breaking changes, new features or for any other reason that requires a version bump,
manually increment the version in the package.json
file. Such as from 0.14.15
to 0.15.0
.
This will automatically trigger a prerelease build with the 0.15.0-beta.0
version.
Actions will not allow you to publish a prerelease of a version that's already published. For example,
if version 0.14.15
already exists on NPM, you can no longer release a 0.14.15-beta.0
version.
To trigger a latest release, go to the GitHub release tool (select releases
under <> Code
).
There, draft a new release, fill the form (see below) and hit Publish release
.
Actions will automatically release the latest version of the package.
- The version tag should be in the format
v${VERSION}
whereVERSION
is the version frompackage.json
. Such asv0.15.0
orv0.16.17
. - The target will typically be
master
, but you can also release any previous commit by selecting it or searching for it by ID. This is useful when there have been some changes in master from the latest prerelease and you'd like to release an older prerelease version as latest. You can find the commit ID easily by searching for the prerelease tag. - The title should be the same as the version tag.
- Typically just adding changelog to the release would be fine, but feel free to add extra information.
Similarly to the prerelease, the latest release process:
- Triggers build, lints, runs tests.
- Publishes new package to NPM with the
latest
tag and the version from package.json. Such as0.15.1
. - A build and deploy of Apify docker images is triggered with the
latest
tag.