2.2 KiB
Development of getsentry/action-release
This 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.
Development
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.
Telemetry for internal development is collected using @sentry/node, see src/telemetry.ts for utilities.
Testing
You can run unit tests with yarn test.
E2E testing on GitHub's CI
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.
Test your own repo against an action-release PR
Note
This assumes that you have gone through the #Usage section and have managed to get your GitHub repository to have worked with this action.
Step 1
- Create a branch, make changes
- If possible, add unit and E2E tests (inside
.github/workflows/test.yml) - Run
yarn installto install deps - Run
yarn buildto build the action - Commit the changes and the build inside
dist/
Step 2
Create a new Sentry project under your existing Sentry org (only this one time).
Step 3
Create an environment variable in GitHub for the branch you release from (e.g. master) and define the same variable as a repository variable which all other branches will use (i.e. your PR's branch)
Step 4
Push to GitHub and the CI will do E2E runs!
Troubleshooting
- If the
verify-distaction fails for your PR, you likely forgot to commit the build output. Runyarn installandyarn buildand commit thedist/folder.