Skip to content
Merged
19 changes: 15 additions & 4 deletions develop-docs/sdk/processes/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Nice!

This file is used to trigger the release from the GitHub UI.

You'll notice it uses `secrets.GH_RELEASE_PAT` -- this should already be
You'll notice it uses `vars.SENTRY_RELEASE_BOT_CLIENT_ID` and `secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY` -- these should already be
available to your repository automatically!

```yaml
Expand All @@ -105,14 +105,20 @@ jobs:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@3378cda945da322a8db4b193e19d46352ebe2de5 #v.1.10.4
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_RELEASE_PAT }}
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
Expand All @@ -132,11 +138,16 @@ Here's [an example PR] and the [follow-up to fix `fetch-depth`].
Give the following teams access to your repository:

- `engineering` -> `write`
- `release-bot` -> `elevated bot`

You can do this self-service via the settings page of your repository:
`https://github.com/getsentry/REPONAME_HERE/settings/access`

## Create ruleset for the repo

Download and save the [default ruleset template](https://docs.sentry.io/json/Default_ruleset.json) as a JSON file.

Visit to the ruleset setting page of your repository: `https://github.com/getsentry/REPONAME_HERE/settings/rules`, click on the green `New ruleset` button, choose `Import a ruleset`, and select the JSON file you just downloaded. You can tweak the ruleset settings as you need, but make sure not to remove the App in the Bypass List.

## Making Your First Release!

Navigate to the actions tab of your repository, locate the release workflow,
Expand Down
40 changes: 40 additions & 0 deletions public/json/Default_ruleset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Default",
"target": "branch",
"source_type": "Repository",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
}
},
"rules": [
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": true,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"automatic_copilot_code_review_enabled": false
}
},
{
"type": "deletion"
},
{
"type": "non_fast_forward"
}
],
"bypass_actors": [
{
"actor_id": 988504,
"actor_type": "Integration",
"bypass_mode": "always"
}
]
}
Loading