This setup assumes you have [Yarn][Yarn], [Volta][volta] and [pre-commit][pre-commit] installed.
After cloning the repo, run
# Install or update application dependencies
makeThis document aims to provide guidelines for maintainers and contains information on how to develop and test this action. For info on how to release changes, follow publishing-a-release.
The action is a composite GitHub Action.
On Linux runners, the action executes the underlying JavaScript script via a Docker image we publish.
For Mac OS and Windows runners, the action cannot run the Docker image and instead installs
the @sentry/cli dependency corresponding to the architecture of the runner and then executes the underlying JavaScript
distribution.
This split in architecture is done to optimize the run-time of the action but at the same time support non-Linux runners.
This action runs fastest on Linux runners.
The action is using @sentry/cli under the hood and is written in TypeScript. See src/main.ts to get started.
Options to the action are exposed via action.yml, changes that impact options need to be documented in the README.md.
Note
Actions have to be exposed in 3 places in action.yml
- Under the
inputsfield - These are the actual inputs exposed to users - Under the
envfield inside theRun docker imagestep. All inputs have to be mapped from inputs toINPUT_Xenv variables. - Under the
envfield inside the `Run Release Action
Telemetry for internal development is collected using @sentry/node, see src/telemetry.ts for utilities.
Note
Contributors will need to create an internal integration in their Sentry org and need to be an admin. See #Prerequisites.
Members of this repo will not have to set anything up since the integration is already set-up. Just open the PR and you will see a release created for your PR.
- Create a branch
- Run
yarn set-docker-tag-from-branchto set a docker tag based on your github branch name. This is important so that the action gets its own Docker image, allowing you to test the action in a different repo. - Make changes
- If possible, add unit and E2E tests (inside
.github/workflows/build.yml) - Run
yarn installto install deps - Run
yarn buildto build the action - Commit the changes and the build inside
dist/
If you forget to run yarn set-docker-tag-from-branch the repo's pre-commit hooks will do it for you and fail the commit.
Just add the changes to staging and commit again.
You can run unit tests with yarn test.
- If the
verify-distaction fails for your PR, you likely forgot to commit the build output. Runyarn installandyarn buildand commit thedist/folder.