optic-release-automation-playground
v2.0.17
Published
Template to start a new repository on the bench
Downloads
11
Readme
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
- You will need to run the optic-expo app on your phone
- 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
- Enable 2FA on NPM (you may have it already enabled)
- 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)
- Generate a NPM Publish token and copy it
- 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 tokenOPTIC_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