feat(ParrotDevtools): add GH action functionality #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #94 by adding a new GitHub action and accompanying script to automate the parrot-devtools extension deployment when PRs making changes to those files get merged.
Description
This PR has two main components: the workflow action, and the deployment script.
The action will fire when a PR is closed against the
main
branch and if the PR contains changes to the parrot-devtools extension files. If it is, it will check to see if the PR was merged, it will attempt to invoke the deployment script. If the PR was closed without merging, a short message will be logged in the action console and nothing else.The deployment script takes advantage of an npm package to upload a zip file to the Chrome Webstore and then publish the extension. It relies on 4 environment variables which will be exposed by the Action using GitHubs encrypted secret manager for the Parrot repo.
Motivation and Context
This automation will remove a tedious manual task from the Parrot maintainers' workloads and simultaneously remove the dependency of a maintainer in order to ensure changes to the parrot-devtools extension are published.
How Has This Been Tested?
These changes have been tested extensively in my own repo using a slightly modified action to ensure that the script and tokens all worked as expected.
Types of Changes
Checklist:
What is the Impact to Developers Using parrot?
The two main things that Parrot devs should know is that
a) this automates a publishing process, and as such, EVERYTHING that gets merged to the
main
branch should be production ready.b) the action will require configuring the 4 environment variables as repo secrets. @amexjake (me) can do this since I'm a maintainer, but it should be noted that the scripts won't work without these secrets defined.