-
Notifications
You must be signed in to change notification settings - Fork 102
CI CD
In this page, we are going to talk about CI/CD in hypertrons-crx. We've got three workflows in hypertrons-crx: build, release-deploy, and update-information.
on push or pull request, this workflow checks format of the code and tests build to master branch. We also create a pre-release if it is a push to master branch.
stateDiagram-v2
state "on:push on:pull_request" as A
state A{
checkout: Check out repository code
setup: Setup Node.js
install: Install dependencies
format: Code Format checks
zip: Zip to hypercrx.zip
existence: Check file existence
Prerelease: Pre-release
[*] --> checkout
checkout --> setup
setup --> install
install --> format
format --> Build
Build --> zip
zip --> existence
existence --> Prerelease: output file exists and is on push
Prerelease --> [*]
existence --> [*]
}
when a workflow_dispatch is triggered, we bump a new version within the pre-commit
. Then, we build and zip the package, rename the release packages, and add them to the Release. At last, we would deploy the packages to both Chrome store and Edge store.
stateDiagram-v2
state "on:workflow_dispatch" as A
state A{
checkout: Check out repository code
setup: Setup Node.js
cca: Conventional Changelog Action
rename:Append version to release file names
[*] --> checkout
checkout --> setup
setup --> cca
cca --> Build
Build --> rename
rename --> Release
Release --> Deploy
Deploy --> [*]
}
On worflow_dispatch is triggered, we also upload some needed information to data center.
stateDiagram-v2
state "on:workflow_dispatch" as A
state A{
checkout: Check out repository code
upload: Upload update_information.json to oss
[*] --> checkout
checkout --> upload
upload --> [*]
}
We would like to add more tests on hypertrons-crx, if you have any ideas, feel free to create an issue to contact us!