Before you get started, we recommend installing Node Version Manager to help manage node and npm versions. Next, from your local copy of the action run nvm use and npm install. You're ready to start coding!
We use the feature branch workflow. The workflow for a typical code change looks like this:
- Create a new branch for the feature.
- Make changes to the code.
- Use
npx changesetto create a changeset describing the change to users. - Commit your changes.
- Open a pull request to the
mainbranch. - Once all checks are passing and the PR is approved, Squash and Merge into the
mainbranch.
The docker image that this action relies on is managed in https://github.com/wpengine/site-deploy. After a new wpengine/site-deploy image is released and tagged:
- Create a new branch.
- Update the tag in ./action.yml.
- Use
npx changesetto create a changeset describing the change to users. - Commit your changes.
- Open a pull request to the
mainbranch. - Once all checks are passing and the PR is approved, Squash and Merge into the
mainbranch.
We use Changesets to automate versioning and releasing.
- Go to pull requests and view the automated "Version Action" PR.
- Review the PR:
- Changelog entries were created.
- Version number in package.json was bumped.
- All
.changeset/*.mdfiles were removed.
- Approve, then "Squash and merge" the PR into
main.
Merging the versioning PR will run a workflow that creates or updates all necessary tags. It will also create a new release in GitHub.