-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(release): add release command group and CI finalization #628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,026
−103
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Sentry Release | ||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| finalize: | ||
| name: Finalize Sentry Release | ||
| runs-on: ubuntu-latest | ||
| # Skip pre-releases (nightlies, dev versions) | ||
| if: "!github.event.release.prerelease" | ||
| env: | ||
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
| # Tag names are bare semver (e.g., "0.24.0", no "v" prefix), | ||
| # matching both the npm package version and Sentry release version. | ||
| VERSION: ${{ github.event.release.tag_name }} | ||
| steps: | ||
| - name: Install CLI | ||
| run: npm install -g "sentry@${VERSION}" | ||
|
|
||
| - name: Create release | ||
| run: sentry release create "sentry/${VERSION}" --project cli | ||
|
|
||
| - name: Set commits | ||
| continue-on-error: true | ||
BYK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: sentry release set-commits "sentry/${VERSION}" --auto | ||
|
|
||
| - name: Finalize release | ||
| run: sentry release finalize "sentry/${VERSION}" | ||
|
|
||
| - name: Create deploy | ||
| run: sentry release deploy "sentry/${VERSION}" production | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| --- | ||
| title: release | ||
| description: Release commands for the Sentry CLI | ||
| --- | ||
|
|
||
| Work with Sentry releases | ||
|
|
||
| ## Commands | ||
|
|
||
| ### `sentry release list <org/project>` | ||
|
|
||
| List releases | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/project>` | <org>/ (all projects), <org>/<project>, or <project> (search) | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `-n, --limit <limit>` | Maximum number of releases to list (default: "30") | | ||
| | `-f, --fresh` | Bypass cache, re-detect projects, and fetch fresh data | | ||
| | `-c, --cursor <cursor>` | Navigate pages: "next", "prev", "first" (or raw cursor string) | | ||
|
|
||
| ### `sentry release view <org/version...>` | ||
|
|
||
| View release details | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version to view | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `-f, --fresh` | Bypass cache, re-detect projects, and fetch fresh data | | ||
|
|
||
| ### `sentry release create <org/version...>` | ||
|
|
||
| Create a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version to create | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `-p, --project <project>` | Associate with project(s), comma-separated | | ||
| | `--finalize` | Immediately finalize the release (set dateReleased) | | ||
| | `--ref <ref>` | Git ref (branch or tag name) | | ||
| | `--url <url>` | URL to the release source | | ||
| | `-n, --dry-run` | Show what would happen without making changes | | ||
|
|
||
| ### `sentry release finalize <org/version...>` | ||
|
|
||
| Finalize a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version to finalize | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `--released <released>` | Custom release timestamp (ISO 8601). Defaults to now. | | ||
| | `--url <url>` | URL for the release | | ||
| | `-n, --dry-run` | Show what would happen without making changes | | ||
|
|
||
| ### `sentry release delete <org/version...>` | ||
|
|
||
| Delete a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version to delete | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `-y, --yes` | Skip confirmation prompt | | ||
| | `-f, --force` | Force the operation without confirmation | | ||
| | `-n, --dry-run` | Show what would happen without making changes | | ||
|
|
||
| ### `sentry release deploy <org/version environment name...>` | ||
|
|
||
| Create a deploy for a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version environment name...>` | [<org>/]<version> <environment> [name] | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `--url <url>` | URL for the deploy | | ||
| | `--started <started>` | Deploy start time (ISO 8601) | | ||
| | `--finished <finished>` | Deploy finish time (ISO 8601) | | ||
| | `-t, --time <time>` | Deploy duration in seconds (sets started = now - time, finished = now) | | ||
| | `-n, --dry-run` | Show what would happen without making changes | | ||
|
|
||
| ### `sentry release deploys <org/version...>` | ||
|
|
||
| List deploys for a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version | | ||
|
|
||
| ### `sentry release set-commits <org/version...>` | ||
|
|
||
| Set commits for a release | ||
|
|
||
| **Arguments:** | ||
|
|
||
| | Argument | Description | | ||
| |----------|-------------| | ||
| | `<org/version...>` | [<org>/]<version> - Release version | | ||
|
|
||
| **Options:** | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `--auto` | Use repository integration to auto-discover commits | | ||
| | `--local` | Read commits from local git history | | ||
| | `--clear` | Clear all commits from the release | | ||
| | `--commit <commit>` | Explicit commit as REPO@SHA or REPO@PREV..SHA (comma-separated) | | ||
| | `--initial-depth <initial-depth>` | Number of commits to read with --local (default: "20") | | ||
|
|
||
| ### `sentry release propose-version` | ||
|
|
||
| Propose a release version | ||
|
|
||
| All commands support `--json` for machine-readable output and `--fields` to select specific JSON fields. | ||
|
|
||
| <!-- GENERATED:END --> | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # List releases (auto-detect org) | ||
| sentry release list | ||
|
|
||
| # List releases in a specific org | ||
| sentry release list my-org/ | ||
|
|
||
| # View release details | ||
| sentry release view 1.0.0 | ||
| sentry release view my-org/1.0.0 | ||
|
|
||
| # Create and finalize a release | ||
| sentry release create 1.0.0 --finalize | ||
|
|
||
| # Create a release, then finalize separately | ||
| sentry release create 1.0.0 | ||
| sentry release set-commits 1.0.0 --auto | ||
| sentry release finalize 1.0.0 | ||
|
|
||
| # Set commits from local git history | ||
| sentry release set-commits 1.0.0 --local | ||
|
|
||
| # Create a deploy | ||
| sentry release deploy 1.0.0 production | ||
| sentry release deploy 1.0.0 staging "Deploy #42" | ||
|
|
||
| # Propose a version from git HEAD | ||
| sentry release create $(sentry release propose-version) | ||
|
|
||
| # Output as JSON | ||
| sentry release list --json | ||
| sentry release view 1.0.0 --json | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.