2.0.5 • Published 9 months ago

optic-release-automation-playground v2.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

CI

Using this playground

For those who are able to contribute to https://github.com/nearform/optic-release-automation-action (right now it's just people in NearForm), this repository can be used as a shared playground to test out your changes.

What do you need to use the playground

  1. You will need to run the optic-expo app on your phone
  2. You will need to be added to the NPM optic-release-automation-playground package as a maintainer

Adding tokens to publish package

Once you have the app on your phone, you need to

  1. Enable 2FA on NPM (you may have it already enabled)
  2. Use Optic as your OTP app for NPM (if you have acces to the QR code or the secret from another 2FA app, you can use that to enable Optic to generate tokens for NPM as well)
  3. Generate a NPM Publish token and copy it
  4. In the Optic app, generate a token for NPM and copy it

Now you have 2 tokens: NPM and Optic.

On this repo main page, click on Settings, then on Secrets and variables on the left side menu and then on the Actions option in the submenu.

Click on New repository secret and add your tokens with the following names:

  • NPM_TOKEN_<GITHUB_USERNAME>: the value will be your NPM Publish token
  • OPTIC_TOKEN_<GITHUB_USERNAME>: the value will be your Optic NPM token

Testing changes

Once you created a branch in https://github.com/nearform/optic-release-automation-action and added the changes you want to test, you can do the following:

  • change the release.yml file to reference your optic-release-automation-action branch in the uses entry
  • push your changes to main (or open a PR and merge it)

Once your changes are in main you can trigger the release action that will use your optic-release-automation-action branch.

This is what should happen:

  • the release action will create a release PR, in the PR there are details of what will be included in the release
  • if all is good, click "merge"
  • the relase action is triggered again and the process of publishing the package starts
  • you should receive a notification on the Optic app on your phone to allow the package new version to be published (note: there is a time limit after which the release action will fail. If that happens you can re-run the release job.)
  • once you confirm via the Optic app, the new version should be released on NPM