Skip to content

Commit 427e14a

Browse files
authored
chore: Clean up docs (#248)
* chore: Clean up docs * Use `E2E` consistently in dev docs
1 parent 19e7996 commit 427e14a

File tree

7 files changed

+27
-169
lines changed

7 files changed

+27
-169
lines changed

.github/ISSUE_TEMPLATE/release-checklist.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Contributing
2+
3+
See the [development guide](./docs/development.md) for getting started developing this action.
4+
25
Feel free to use GitHub's pull request features to propose changes.
36

47
See the [Code of Conduct](https://github.com/getsentry/.github/blob/main/CODE_OF_CONDUCT.md).

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
# Sentry Release GitHub Action
1212

13-
> [!IMPORTANT]
14-
> This action is currently only available for Linux runners.
15-
> See [this issue](https://github.com/getsentry/action-release/issues/58) for more details.
16-
1713
Automatically create a Sentry release in a workflow.
1814

1915
A release is a version of your code that can be deployed to an environment. When you give Sentry information about your releases, you unlock a number of new features:
@@ -36,22 +32,7 @@ Please refer to the [release page](https://github.com/getsentry/action-release/r
3632

3733
## Prerequisites
3834

39-
### Create an Organization Auth Token
40-
41-
For this action to communicate securely with Sentry, you'll need to [create an organization auth token](https://docs.sentry.io/account/auth-tokens/#organization-auth-tokens).
42-
43-
44-
You also need to set your Organization and Project slugs and if you're using a self-hosted Sentry instance, provide the URL used to connect to Sentry via SENTRY_URL.
45-
46-
```bash
47-
SENTRY_AUTH_TOKEN=sntrys_YOUR_TOKEN_HERE
48-
SENTRY_ORG=example-org
49-
SENTRY_PROJECT=example-project
50-
# For self-hosted
51-
# SENTRY_URL=https://my-sentry-url
52-
```
53-
54-
We recommend storing these as [encrypted secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) on your repository.
35+
See how to [set up the prerequisites](https://docs.sentry.io/product/releases/setup/release-automation/github-actions/#prerequisites) for the Action to securely communicate with Sentry.
5536

5637
## Usage
5738

docs/development.md

Lines changed: 10 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ You can run unit tests with `yarn test`.
1717

1818
### E2E testing on GitHub's CI
1919

20-
The first job in [test.yml](../.github/workflows/test.yml) has instructions on how to tweak a job in order to execute your changes as part of the PR.
21-
2220
> [!NOTE]
2321
> Contributors will need to create an internal integration in their Sentry org and need to be an admin.
2422
> See [#Prerequisites](../README.md#prerequisites).
@@ -30,91 +28,24 @@ Members of this repo will not have to set anything up since [the integration](ht
3028
> [!NOTE]
3129
> This assumes that you have gone through the [#Usage](../README.md#usage) section and have managed to get your GitHub repository to have worked with this action.
3230
33-
> [!NOTE]
34-
> Once we start producing Docker images for PRs we can get rid of the need of using the `sed` command below.
35-
3631
**Step 1**
3732

38-
- Create a branch, make changes and push it
39-
- Run this command, commit the changes and push it
40-
- This will cause the action-release to be built using the `Dockerfile`
41-
- You will need to revert this change once your changes are approved and ready to be merged
42-
43-
```shell
44-
sed -i .backup 's|docker://ghcr.io/getsentry/action-release-image:latest|Dockerfile|' action.yml
45-
```
33+
- Create a branch, make changes
34+
- If possible, add unit and E2E tests (inside `.github/workflows/test.yml`)
35+
- Run `yarn install` to install deps
36+
- Run `yarn build` to build the action
37+
- Commit the changes and the build inside `dist/`
4638

4739
**Step 2**
48-
Test out your action-release changes on your own repo.
49-
50-
- Get the sha for the latest commit on **Step 1**
51-
- Modify your usage of action-release to point to that commit (if you're using a fork, edit the `getsentry` org in the string below)
52-
53-
Example:
54-
55-
```yml
56-
- name: Sentry Release
57-
uses: getsentry/action-release@<latest commit sha>
58-
env:
59-
# You will remove this in the next steps when ready
60-
MOCK: true
61-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
62-
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
63-
# If you specify a GitHub environment for the branch from where you create
64-
# releases from (e.g. master), you can then specify a repository-level variable
65-
# for all other branches. This allows using a second project for end-to-end testing
66-
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
67-
```
68-
69-
> [!NOTE]
70-
> If you want to locally test the action, read the next section, otherwise, keep reading.
71-
72-
> [!NOTE]
73-
> Only remove `MOCK: true` once you follow the steps below that will allow you to use two different projects. This will avoid polluting your Sentry releases for your existing Sentry project.
74-
75-
**Step 3**
7640
Create a new Sentry project under your existing Sentry org (only this one time).
7741

78-
**Step 4**
79-
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)
80-
81-
**Step 5**
82-
Comment out the MOCK env variable from **Step 2**.
83-
84-
**Step 6**
85-
Push to GitHub and the CI will do an end-to-end run!
86-
87-
### Local testing via act
88-
89-
Alternatively, you can test the action locally using [act](https://github.com/nektos/act).
90-
91-
To get started, you can clone [this sample repo](https://github.com/scefali/github-actions-react/blob/master/.github/workflows/deploy.yml) to test locally.
92-
93-
**Step 1**
94-
Install `act`.
95-
96-
```bash
97-
brew install act
98-
```
99-
100-
> [!NOTE]
101-
> Make sure you commit your changes in your branch before running `act`.
102-
10342
**Step 3**
104-
Create an integration and set the SENTRY_AUTH_TOKEN (see [#Usage](../README.md#usage)).
105-
106-
> [!NOTE]
107-
> If you have `direnv` installed, you can define the variable within your repo in an `.env` file.
43+
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)
10844

10945
**Step 4**
110-
Run the action.
111-
112-
```bash
113-
act -s SENTRY_ORG={your_org_slug} -s SENTRY_PROJECT={your_project_slug}
114-
```
46+
Push to GitHub and the CI will do E2E runs!
11547

116-
> [!NOTE]
117-
> Make sure that `SENTRY_AUTH_TOKEN` is loaded as an env variable.
48+
### Troubleshooting
11849

119-
**Step 5**
120-
Choose Medium Docker builds.
50+
- If the `verify-dist` action fails for your PR, you likely forgot to commit the build output.
51+
Run `yarn install` and `yarn build` and commit the `dist/` folder.

docs/publishing-a-release.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
# Publishing a release
2-
3-
The [build.yml](../.github/workflows/build.yml) workflow will build a Docker image every time a pull request merges to `master` and upload it to [the GitHub registry](https://github.com/orgs/getsentry/packages?repo_name=action-release).
4-
5-
> [!WARNING]
6-
> Merging pull requests into `master` means changes are live for anyone who uses the action regardless of bumping the version.
7-
> Be extremely careful and intentional with changes and ensure properly testing them before merging, see [#Testing](development.md#testing) for more info.
8-
9-
> [!NOTE]
10-
> Unfortunately, we only use the `latest` tag for the Docker image, thus, making use of a version with the action ineffective (e.g. `v1` vs `v1.3.0`).
11-
> See #129 on how to fix this.
12-
13-
> [!NOTE]
14-
> At the moment our Docker image publishing is decoupled from `tag` creation in the repository.
15-
> We should only publish a specific Docker tag when we create a tag (you can make GitHub workflows listen to this). See #102 for details.
16-
> Once this is fixed, merges to `master` will not make the Docker image live.
17-
18-
When you are ready to make a release, open a [new release checklist issue](https://github.com/getsentry/action-release/issues/new?assignees=&labels=&template=release-checklist.md&title=New+release+checklist+for+%5Bversion+number%5D) and follow the steps in there.
19-
20-
> [!NOTE]
21-
> At the moment releases are only used to inform users of changes.
22-
23-
The Docker build is [multi-staged](https://github.com/getsentry/action-release/blob/master/Dockerfile) in order to make the final image used by the action as small as possible to reduce network transfer (use `docker images` to see the sizes of the images).
1+
# Publishing a Release
2+
3+
_These steps are only relevant to Sentry employees when preparing and publishing a new release._
4+
5+
1. Open the [Prepare Release workflow](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) and
6+
fill in ![Prepare a Release workflow](../images/prepare_release.png)
7+
1. Click gray `Run workflow` button
8+
2. Fill in the version you want to release, e.g. `1.13.3`
9+
3. Click the green `Run workflow` button
10+
2. A new issue should appear in https://github.com/getsentry/publish/issues.
11+
3. Wait until the CI check runs have finished successfully (there is a link to them in the issue).
12+
4. Once CI passes successfully, ask a member of the
13+
[@getsentry/releases-approvers](https://github.com/orgs/getsentry/teams/release-approvers) to approve the release.
-29.2 KB
Binary file not shown.

images/prepare_release.png

85 KB
Loading

0 commit comments

Comments
 (0)