radarlabs / radar-sdk-js

Web JavaScript SDK for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
42 stars 11 forks source link

Github Action for releases #94

Closed tjulien closed 1 year ago

tjulien commented 1 year ago

Automate release process with Github Actions.

There are two workflows. Each one will publish the version to npm, and upload the artifacts to S3 for usage with script tags:

This also adds some checks to the release process:

Also adds a utility script for updating version references in code npm run bump-version -- <version>

kochis commented 1 year ago

The dist/ files aren't checked in, so we probably need to include a build step in here (and probably tests too).

We be good to also automate (or at least verify) that all of the versions match correctly:

Edit: I guess the build step is covered by prepare

tjulien commented 1 year ago

@kochis would be cool to cross check all of the versions in those files. We don't really do that with the other SDKs at the moment, maybe can do that after we get this basic one working. In the other notion pages we do document it, we can do that for the web sdk too (for example: https://www.notion.so/radarlabs/How-to-release-the-React-Native-SDK-21c70f16e0bd4fe28425923645cadda0)

tjulien commented 1 year ago

@kochis I added steps for npm build and npm test

kochis commented 1 year ago

Yeah, the steps to update all the files are also documented for JS, but if the point of this is to automate the build, it would be good to have this as well since it's part of the process.

We do have a test to ensure that they match: https://github.com/radarlabs/radar-sdk-js/blob/master/test/version.test.js

We don't need to automate the bumping of the versions, but would be good to have some additional step to ensure it matches the tag. I can take a stab at this (will just make a small npm script)

kochis commented 1 year ago

Release uploaded to S3: https://js.radar.com/v3.7.1-beta.2/radar.js

Beta npm version published: https://www.npmjs.com/package/radar-sdk-js?activeTab=versions