From 886062a98087d266ed3766a31021b0383b96e647 Mon Sep 17 00:00:00 2001 From: Trevor White Date: Mon, 23 Jun 2025 07:58:02 -0700 Subject: [PATCH 01/10] Add support for "manual" in set-commits --- action.yml | 9 ++++++++- src/main.ts | 13 ++++++++++++- src/options.ts | 21 +++++++++++++++++++-- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 94b93e3b..e7c68528 100644 --- a/action.yml +++ b/action.yml @@ -76,7 +76,12 @@ inputs: set_commits: description: |- Specify whether to set commits for the release. - One of: "auto", "skip" + One of: "auto", "skip", "manual" + required: false + commit_range: + description: |- + If set commits equals manual, include a comma separated list of repo,current commit,previous commit. + Example: octocat/my-repo,ae1d1cd5d658e784dcfdff36afe93f75b764cb82,7711b5c927410659df736751ec8124469f87e233 required: false projects: description: |- @@ -142,6 +147,7 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} + INPUT_COMMIT_RANGE: ${{ inputs.commit_range }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} @@ -204,6 +210,7 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} + INPUT_COMMIT_RANGE: ${{ inputs.commit_range }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} diff --git a/src/main.ts b/src/main.ts index daff77ce..a0daf76e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -31,6 +31,7 @@ withTelemetry( const ignoreEmpty = options.getBooleanOption('ignore_empty', false); const deployStartedAtOption = options.getStartedAt(); const setCommitsOption = options.getSetCommitsOption(); + const commitRange = options.getCommitRange(); const projects = options.getProjects(); const urlPrefix = options.getUrlPrefixOption(); const stripCommonPrefix = options.getBooleanOption('strip_common_prefix', false); @@ -47,7 +48,17 @@ withTelemetry( Sentry.setTag('set-commits', setCommitsOption); - if (setCommitsOption !== 'skip') { + if (setCommitsOption === 'manual') { + await traceStep('set-commits', async () => { + core.debug(`Setting commits with option '${setCommitsOption}'`); + await getCLI().setCommits(release, { + auto: false, + repo: commitRange.get('repo'), + commit: commitRange.get('currentCommit'), + previousCommit: commitRange.get('previousCommit'), + }); + }); + } else if (setCommitsOption !== 'skip') { await traceStep('set-commits', async () => { core.debug(`Setting commits with option '${setCommitsOption}'`); await getCLI().setCommits(release, { diff --git a/src/options.ts b/src/options.ts index a1afad80..a44e5967 100644 --- a/src/options.ts +++ b/src/options.ts @@ -127,7 +127,7 @@ export const getBooleanOption = (input: string, defaultValue: boolean): boolean throw Error(`${input} is not a boolean`); }; -export const getSetCommitsOption = (): 'auto' | 'skip' => { +export const getSetCommitsOption = (): 'auto' | 'skip' | 'manual' => { let setCommitOption = core.getInput('set_commits'); // default to auto if (!setCommitOption) { @@ -138,13 +138,30 @@ export const getSetCommitsOption = (): 'auto' | 'skip' => { switch (setCommitOption) { case 'auto': return 'auto'; + case 'manual': + return 'manual'; case 'skip': return 'skip'; default: - throw Error('set_commits must be "auto" or "skip"'); + throw Error('set_commits must be "auto" or "skip" or "manual"'); } }; +export const getCommitRange = (): Map => { + const commitRange = core.getInput('commit_range'); + + // Split the input by a common comma delimiter + const [repo, currentCommit, previousCommit] = commitRange.split(','); + + // Create a map and update with the provided values + const commitRangeDetails = new Map(); + commitRangeDetails.set('repo', repo.trim()); + commitRangeDetails.set('currentCommit', currentCommit.trim()); + commitRangeDetails.set('previousCommit', previousCommit.trim()); + + return commitRangeDetails; +}; + /** * Check for required environment variables. */ From 9ad35d72f3c52f6644ff2ba72a6cb64d2fde8674 Mon Sep 17 00:00:00 2001 From: Trevor White Date: Mon, 23 Jun 2025 08:39:02 -0700 Subject: [PATCH 02/10] Run yarn commands --- action.yml | 2 +- dist/index.js | 32 +++++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index e7c68528..ee27fa81 100644 --- a/action.yml +++ b/action.yml @@ -154,7 +154,7 @@ runs: INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }} INPUT_DISABLE_TELEMETRY: ${{ inputs.disable_telemetry }} INPUT_DISABLE_SAFE_DIRECTORY: ${{ inputs.disable_safe_directory }} - uses: docker://ghcr.io/getsentry/action-release-image:master + uses: docker://ghcr.io/getsentry/action-release-image:feature-add-manual-commit-range # For actions running on macos or windows runners, we use a composite # action approach which allows us to install the arch specific sentry-cli diff --git a/dist/index.js b/dist/index.js index 03f976d3..51ced14d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -122736,6 +122736,7 @@ const telemetry_1 = __nccwpck_require__(12417); const ignoreEmpty = options.getBooleanOption('ignore_empty', false); const deployStartedAtOption = options.getStartedAt(); const setCommitsOption = options.getSetCommitsOption(); + const commitRange = options.getCommitRange(); const projects = options.getProjects(); const urlPrefix = options.getUrlPrefixOption(); const stripCommonPrefix = options.getBooleanOption('strip_common_prefix', false); @@ -122749,7 +122750,18 @@ const telemetry_1 = __nccwpck_require__(12417); core.debug(`Release version is ${release}`); yield (0, cli_1.getCLI)().new(release, { projects }); Sentry.setTag('set-commits', setCommitsOption); - if (setCommitsOption !== 'skip') { + if (setCommitsOption === 'manual') { + yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { + core.debug(`Setting commits with option '${setCommitsOption}'`); + yield (0, cli_1.getCLI)().setCommits(release, { + auto: false, + repo: commitRange.get('repo'), + commit: commitRange.get('currentCommit'), + previousCommit: commitRange.get('previousCommit'), + }); + })); + } + else if (setCommitsOption !== 'skip') { yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { core.debug(`Setting commits with option '${setCommitsOption}'`); yield (0, cli_1.getCLI)().setCommits(release, { @@ -122860,7 +122872,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; +exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getCommitRange = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; const core = __importStar(__nccwpck_require__(42186)); const path_1 = __importDefault(__nccwpck_require__(71017)); const cli_1 = __nccwpck_require__(56733); @@ -122991,13 +123003,27 @@ const getSetCommitsOption = () => { switch (setCommitOption) { case 'auto': return 'auto'; + case 'manual': + return 'manual'; case 'skip': return 'skip'; default: - throw Error('set_commits must be "auto" or "skip"'); + throw Error('set_commits must be "auto" or "skip" or "manual"'); } }; exports.getSetCommitsOption = getSetCommitsOption; +const getCommitRange = () => { + const commitRange = core.getInput('commit_range'); + // Split the input by a common comma delimiter + const [repo, currentCommit, previousCommit] = commitRange.split(','); + // Create a map and update with the provided values + const commitRangeDetails = new Map(); + commitRangeDetails.set('repo', repo.trim()); + commitRangeDetails.set('currentCommit', currentCommit.trim()); + commitRangeDetails.set('previousCommit', previousCommit.trim()); + return commitRangeDetails; +}; +exports.getCommitRange = getCommitRange; /** * Check for required environment variables. */ From e39bc286bd9f83e8da38a95defe297e3f6794039 Mon Sep 17 00:00:00 2001 From: Trevor White Date: Tue, 24 Jun 2025 20:53:59 -0700 Subject: [PATCH 03/10] Update the API per PR conversations --- action.yml | 7 +---- src/main.ts | 16 ++++++------ src/options.ts | 69 ++++++++++++++++++++++++++++++++------------------ 3 files changed, 53 insertions(+), 39 deletions(-) diff --git a/action.yml b/action.yml index ee27fa81..22fa441a 100644 --- a/action.yml +++ b/action.yml @@ -76,12 +76,7 @@ inputs: set_commits: description: |- Specify whether to set commits for the release. - One of: "auto", "skip", "manual" - required: false - commit_range: - description: |- - If set commits equals manual, include a comma separated list of repo,current commit,previous commit. - Example: octocat/my-repo,ae1d1cd5d658e784dcfdff36afe93f75b764cb82,7711b5c927410659df736751ec8124469f87e233 + One of: "auto", "skip", "repo-owner/repo-name@commit", "repo-owner/repo-name@.." required: false projects: description: |- diff --git a/src/main.ts b/src/main.ts index a0daf76e..c9c313e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -31,7 +31,6 @@ withTelemetry( const ignoreEmpty = options.getBooleanOption('ignore_empty', false); const deployStartedAtOption = options.getStartedAt(); const setCommitsOption = options.getSetCommitsOption(); - const commitRange = options.getCommitRange(); const projects = options.getProjects(); const urlPrefix = options.getUrlPrefixOption(); const stripCommonPrefix = options.getBooleanOption('strip_common_prefix', false); @@ -46,19 +45,20 @@ withTelemetry( core.debug(`Release version is ${release}`); await getCLI().new(release, { projects }); - Sentry.setTag('set-commits', setCommitsOption); + Sentry.setTag('set-commits', setCommitsOption.get('mode')); - if (setCommitsOption === 'manual') { + if (setCommitsOption.get('mode') === 'manual') { await traceStep('set-commits', async () => { - core.debug(`Setting commits with option '${setCommitsOption}'`); + core.debug(`Setting commits with options '${setCommitsOption}'`); + const previousCommit = setCommitsOption.get('previous_commit'); await getCLI().setCommits(release, { auto: false, - repo: commitRange.get('repo'), - commit: commitRange.get('currentCommit'), - previousCommit: commitRange.get('previousCommit'), + repo: setCommitsOption.get('repo'), + commit: setCommitsOption.get('commit'), + ...(previousCommit && { previousCommit }), }); }); - } else if (setCommitsOption !== 'skip') { + } else if (setCommitsOption.get('mode') !== 'skip') { await traceStep('set-commits', async () => { core.debug(`Setting commits with option '${setCommitsOption}'`); await getCLI().setCommits(release, { diff --git a/src/options.ts b/src/options.ts index a44e5967..3b09783d 100644 --- a/src/options.ts +++ b/src/options.ts @@ -127,39 +127,58 @@ export const getBooleanOption = (input: string, defaultValue: boolean): boolean throw Error(`${input} is not a boolean`); }; -export const getSetCommitsOption = (): 'auto' | 'skip' | 'manual' => { +export const getSetCommitsOption = (): Map => { let setCommitOption = core.getInput('set_commits'); - // default to auto + + // Default to "auto" if the input is empty or undefined if (!setCommitOption) { - return 'auto'; + return new Map([['mode', 'auto']]); } - // convert to lower case - setCommitOption = setCommitOption.toLowerCase(); + + // Convert input to lower case for uniformity + setCommitOption = setCommitOption.trim().toLowerCase(); + + // Create a map for the output structure + const result = new Map(); + + // Handle the different cases for set_commits switch (setCommitOption) { case 'auto': - return 'auto'; - case 'manual': - return 'manual'; + result.set('mode', 'auto'); + break; case 'skip': - return 'skip'; - default: - throw Error('set_commits must be "auto" or "skip" or "manual"'); - } -}; - -export const getCommitRange = (): Map => { - const commitRange = core.getInput('commit_range'); - - // Split the input by a common comma delimiter - const [repo, currentCommit, previousCommit] = commitRange.split(','); + result.set('mode', 'skip'); + break; + default: { + // Handle repo-owner/repo-name@commit or commit range + const regex = /^([\w\-]+\/[\w\-]+)@([\w\-.]+(?:\.\.|@[\w\-.]+)?)$/; + const match = regex.exec(setCommitOption); + + if (!match) { + throw new Error( + 'Invalid value for set_commits. Expected "auto", "skip", or "repo-owner/repo-name@commit" / "repo-owner/repo-name@..".' + ); + } - // Create a map and update with the provided values - const commitRangeDetails = new Map(); - commitRangeDetails.set('repo', repo.trim()); - commitRangeDetails.set('currentCommit', currentCommit.trim()); - commitRangeDetails.set('previousCommit', previousCommit.trim()); + // Parse repo and commit(s) from the input + const [, repository, commitRange] = match; + result.set('mode', 'manual'); + result.set('repository', repository); + + if (commitRange.includes('..')) { + // Handle commit range + const [previousCommit, currentCommit] = commitRange.split('..'); + result.set('previous_commit', previousCommit); + result.set('commit', currentCommit); + } else { + // Single commit + result.set('commit', commitRange); + } + break; + } + } - return commitRangeDetails; + return result; }; /** From 1fe573de13db2882e45ac9321c5f1fd689a6f268 Mon Sep 17 00:00:00 2001 From: Trevor White Date: Tue, 24 Jun 2025 20:56:27 -0700 Subject: [PATCH 04/10] Remove input_commit_range --- action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yml b/action.yml index 22fa441a..caa6d770 100644 --- a/action.yml +++ b/action.yml @@ -142,7 +142,6 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} - INPUT_COMMIT_RANGE: ${{ inputs.commit_range }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} @@ -205,7 +204,6 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} - INPUT_COMMIT_RANGE: ${{ inputs.commit_range }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} From 7d459d5941308a819289993c65be32fb133df5ad Mon Sep 17 00:00:00 2001 From: Trevor White Date: Tue, 24 Jun 2025 20:58:19 -0700 Subject: [PATCH 05/10] Add yarn-build changes --- dist/index.js | 76 ++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/dist/index.js b/dist/index.js index 51ced14d..2287478b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -122736,7 +122736,6 @@ const telemetry_1 = __nccwpck_require__(12417); const ignoreEmpty = options.getBooleanOption('ignore_empty', false); const deployStartedAtOption = options.getStartedAt(); const setCommitsOption = options.getSetCommitsOption(); - const commitRange = options.getCommitRange(); const projects = options.getProjects(); const urlPrefix = options.getUrlPrefixOption(); const stripCommonPrefix = options.getBooleanOption('strip_common_prefix', false); @@ -122749,19 +122748,15 @@ const telemetry_1 = __nccwpck_require__(12417); } core.debug(`Release version is ${release}`); yield (0, cli_1.getCLI)().new(release, { projects }); - Sentry.setTag('set-commits', setCommitsOption); - if (setCommitsOption === 'manual') { + Sentry.setTag('set-commits', setCommitsOption.get('mode')); + if (setCommitsOption.get('mode') === 'manual') { yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { - core.debug(`Setting commits with option '${setCommitsOption}'`); - yield (0, cli_1.getCLI)().setCommits(release, { - auto: false, - repo: commitRange.get('repo'), - commit: commitRange.get('currentCommit'), - previousCommit: commitRange.get('previousCommit'), - }); + core.debug(`Setting commits with options '${setCommitsOption}'`); + const previousCommit = setCommitsOption.get('previous_commit'); + yield (0, cli_1.getCLI)().setCommits(release, Object.assign({ auto: false, repo: setCommitsOption.get('repo'), commit: setCommitsOption.get('commit') }, (previousCommit && { previousCommit }))); })); } - else if (setCommitsOption !== 'skip') { + else if (setCommitsOption.get('mode') !== 'skip') { yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { core.debug(`Setting commits with option '${setCommitsOption}'`); yield (0, cli_1.getCLI)().setCommits(release, { @@ -122872,7 +122867,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getCommitRange = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; +exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; const core = __importStar(__nccwpck_require__(42186)); const path_1 = __importDefault(__nccwpck_require__(71017)); const cli_1 = __nccwpck_require__(56733); @@ -122994,36 +122989,49 @@ const getBooleanOption = (input, defaultValue) => { exports.getBooleanOption = getBooleanOption; const getSetCommitsOption = () => { let setCommitOption = core.getInput('set_commits'); - // default to auto + // Default to "auto" if the input is empty or undefined if (!setCommitOption) { - return 'auto'; + return new Map([['mode', 'auto']]); } - // convert to lower case - setCommitOption = setCommitOption.toLowerCase(); + // Convert input to lower case for uniformity + setCommitOption = setCommitOption.trim().toLowerCase(); + // Create a map for the output structure + const result = new Map(); + // Handle the different cases for set_commits switch (setCommitOption) { case 'auto': - return 'auto'; - case 'manual': - return 'manual'; + result.set('mode', 'auto'); + break; case 'skip': - return 'skip'; - default: - throw Error('set_commits must be "auto" or "skip" or "manual"'); + result.set('mode', 'skip'); + break; + default: { + // Handle repo-owner/repo-name@commit or commit range + const regex = /^([\w\-]+\/[\w\-]+)@([\w\-.]+(?:\.\.|@[\w\-.]+)?)$/; + const match = regex.exec(setCommitOption); + if (!match) { + throw new Error('Invalid value for set_commits. Expected "auto", "skip", or "repo-owner/repo-name@commit" / "repo-owner/repo-name@..".'); + } + // Parse repo and commit(s) from the input + const [, repository, commitRange] = match; + result.set('mode', 'manual'); + result.set('repository', repository); + if (commitRange.includes('..')) { + // Handle commit range + const [previousCommit, currentCommit] = commitRange.split('..'); + result.set('previous_commit', previousCommit); + result.set('commit', currentCommit); + } + else { + // Single commit + result.set('commit', commitRange); + } + break; + } } + return result; }; exports.getSetCommitsOption = getSetCommitsOption; -const getCommitRange = () => { - const commitRange = core.getInput('commit_range'); - // Split the input by a common comma delimiter - const [repo, currentCommit, previousCommit] = commitRange.split(','); - // Create a map and update with the provided values - const commitRangeDetails = new Map(); - commitRangeDetails.set('repo', repo.trim()); - commitRangeDetails.set('currentCommit', currentCommit.trim()); - commitRangeDetails.set('previousCommit', previousCommit.trim()); - return commitRangeDetails; -}; -exports.getCommitRange = getCommitRange; /** * Check for required environment variables. */ From 84a1fd1c88368ae2b7637556cd7d171625aef544 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 31 Oct 2025 09:52:41 +0100 Subject: [PATCH 06/10] Refactor to add repo, commit and previous_commit options --- .github/workflows/build.yml | 22 +++++ README.md | 158 +++++++++++++++++++----------------- __tests__/main.test.ts | 27 +++++- action.yml | 24 +++++- dist/index.js | 85 ++++++++----------- src/main.ts | 41 ++++++---- src/options.ts | 63 ++++---------- 7 files changed, 232 insertions(+), 188 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b463a36..3d1a5dbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,4 +266,26 @@ jobs: echo "ERROR: Node version changed from ${{ steps.node_before.outputs.VERSION }} to $VERSION_AFTER" exit 1 fi + echo "SUCCESS: Node version preserved" + + test-manual-commit-range: + needs: docker-build + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + name: Test manual commit range + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create a release with manual commit range + uses: ./ + with: + environment: production + set_commits: manual + repo: getsentry/action-release + commit: ${{ github.sha }} + previous_commit: ${{ github.sha }} diff --git a/README.md b/README.md index 658ee538..8451d861 100644 --- a/README.md +++ b/README.md @@ -58,66 +58,78 @@ Adding the following to your workflow will create a new Sentry release and tell #### Environment Variables -|name|description|default| -|---|---|---| -|`SENTRY_AUTH_TOKEN`|**[Required]** Authentication token for Sentry. See [installation](#create-a-sentry-internal-integration).|-| -|`SENTRY_ORG`|**[Required]** The slug of the organization name in Sentry.|-| -|`SENTRY_PROJECT`|The slug of the project name in Sentry. One of `SENTRY_PROJECT` or `projects` is required.|-| -|`SENTRY_URL`|The URL used to connect to Sentry. (Only required for [Self-Hosted Sentry](https://develop.sentry.dev/self-hosted/))|`https://sentry.io/`| +| name | description | default | +| ------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------- | +| `SENTRY_AUTH_TOKEN` | **[Required]** Authentication token for Sentry. See [installation](#create-a-sentry-internal-integration). | - | +| `SENTRY_ORG` | **[Required]** The slug of the organization name in Sentry. | - | +| `SENTRY_PROJECT` | The slug of the project name in Sentry. One of `SENTRY_PROJECT` or `projects` is required. | - | +| `SENTRY_URL` | The URL used to connect to Sentry. (Only required for [Self-Hosted Sentry](https://develop.sentry.dev/self-hosted/)) | `https://sentry.io/` | #### Parameters -| name | description |default| -|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| -| `environment` | Set the environment for this release. E.g. "production" or "staging". Omit to skip adding deploy to release. |-| -| `sourcemaps` | Space-separated list of paths to JavaScript sourcemaps. Omit to skip uploading sourcemaps. |-| -| `inject` | Injects Debug IDs into source files and source maps to ensure proper un-minifcation of your stacktraces. Does nothing if `sourcemaps` was not set. |`true`| -| `finalize` | When false, omit marking the release as finalized and released. |`true`| -| `ignore_missing` | When the flag is set and the previous release commit was not found in the repository, will create a release with the default commits count instead of failing the command. |`false`| -| `ignore_empty` | When the flag is set, command will not fail and just exit silently if no new commits for a given release have been found. |`false`| -| `dist` | Unique identifier for the distribution, used to further segment your release. Usually your build number. |-| -| `started_at` | Unix timestamp of the release start date. Omit for current time. |-| -| `release` | Identifier that uniquely identifies the releases. Should match the `release` property in your Sentry SDK init call if one was set._Note: the `refs/tags/` prefix is automatically stripped when `version` is `github.ref`._ |${{ github.sha }}| -| `version` | Deprecated: Use `release` instead. |${{ github.sha }}| -| `release_prefix` | Value prepended to auto-generated version. For example "v". |-| -| `version_prefix` | Deprecated: Use `release_prefix` instead. |-| -| `set_commits` | Specify whether to set commits for the release. Either "auto" or "skip". |"auto"| -| `projects` | Space-separated list of paths of projects. When omitted, falls back to the environment variable `SENTRY_PROJECT` to determine the project. |-| -| `url_prefix` | Adds a prefix to source map urls after stripping them. |-| -| `strip_common_prefix` | Will remove a common prefix from uploaded filenames. Useful for removing a path that is build-machine-specific. |`false`| -| `working_directory` | Directory to collect sentry release information from. Useful when collecting information from a non-standard checkout directory. |-| -| `disable_telemetry` | The action sends telemetry data and crash reports to Sentry. This helps us improve the action. You can turn this off by setting this flag. |`false`| -| `disable_safe_directory` | The action needs access to the repo it runs in. For that we need to configure git to mark the repo as a safe directory. You can turn this off by setting this flag. |`false`| - +| name | description | default | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `environment` | Set the environment for this release. E.g. "production" or "staging". Omit to skip adding deploy to release. | - | +| `sourcemaps` | Space-separated list of paths to JavaScript sourcemaps. Omit to skip uploading sourcemaps. | - | +| `inject` | Injects Debug IDs into source files and source maps to ensure proper un-minifcation of your stacktraces. Does nothing if `sourcemaps` was not set. | `true` | +| `finalize` | When false, omit marking the release as finalized and released. | `true` | +| `ignore_missing` | When the flag is set and the previous release commit was not found in the repository, will create a release with the default commits count instead of failing the command. | `false` | +| `ignore_empty` | When the flag is set, command will not fail and just exit silently if no new commits for a given release have been found. | `false` | +| `dist` | Unique identifier for the distribution, used to further segment your release. Usually your build number. | - | +| `started_at` | Unix timestamp of the release start date. Omit for current time. | - | +| `release` | Identifier that uniquely identifies the releases. Should match the `release` property in your Sentry SDK init call if one was set. _Note: the `refs/tags/` prefix is automatically stripped when `version` is `github.ref`._ | ${{ github.sha }} | +| `version` | Deprecated: Use `release` instead. | ${{ github.sha }} | +| `release_prefix` | Value prepended to auto-generated version. For example "v". | - | +| `version_prefix` | Deprecated: Use `release_prefix` instead. | - | +| `set_commits` | Specify whether to set commits for the release. When "manual", you need to provide the repository, commit, and previous commit. One of "auto", "skip" or "manual". | "auto" | +| `repo` | The repository to set commits for in "repo-owner/repo-name" format. Only used when `set_commits` is "manual". | - | +| `commit` | The commit SHA of the current release you are creating. Only used when `set_commits` is "manual". | - | +| `previous_commit` | The commit SHA of the previous release. Required when `set_commits` is "manual". | - | +| `projects` | Space-separated list of paths of projects. When omitted, falls back to the environment variable `SENTRY_PROJECT` to determine the project. | - | +| `url_prefix` | Adds a prefix to source map urls after stripping them. | - | +| `strip_common_prefix` | Will remove a common prefix from uploaded filenames. Useful for removing a path that is build-machine-specific. | `false` | +| `working_directory` | Directory to collect sentry release information from. Useful when collecting information from a non-standard checkout directory. | - | +| `disable_telemetry` | The action sends telemetry data and crash reports to Sentry. This helps us improve the action. You can turn this off by setting this flag. | `false` | +| `disable_safe_directory` | The action needs access to the repo it runs in. For that we need to configure git to mark the repo as a safe directory. You can turn this off by setting this flag. | `false` | ### Examples - Create a new Sentry release for the `production` environment, inject Debug IDs into JavaScript source files and source maps and upload them from the `./dist` directory. - ```yaml - - uses: getsentry/action-release@v3 - with: - environment: 'production' - sourcemaps: './dist' - ``` + ```yaml + - uses: getsentry/action-release@v3 + with: + environment: 'production' + sourcemaps: './dist' + ``` - Create a new Sentry release for the `production` environment of your project at version `v1.0.1`. - ```yaml - - uses: getsentry/action-release@v3 - with: - environment: 'production' - release: 'v1.0.1' - ``` + ```yaml + - uses: getsentry/action-release@v3 + with: + environment: 'production' + release: 'v1.0.1' + ``` - Create a new Sentry release for [Self-Hosted Sentry](https://develop.sentry.dev/self-hosted/) - ```yaml - - uses: getsentry/action-release@v3 - env: - SENTRY_URL: https://sentry.example.com/ - ``` + ```yaml + - uses: getsentry/action-release@v3 + env: + SENTRY_URL: https://sentry.example.com/ + ``` + +- Manually specify the commit range for the release. + ```yaml + - uses: getsentry/action-release@v3 + with: + set_commits: manual + repo: your-org/your-repo + commit: ${{ github.sha }} + previous_commit: + ``` ## Contributing @@ -135,36 +147,36 @@ Suggestions and issues can be posted on the repository's - Forgetting to include the required environment variables (`SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT`), yields an error that looks like: - ```text - Environment variable SENTRY_ORG is missing an organization slug - ``` + ```text + Environment variable SENTRY_ORG is missing an organization slug + ``` - Building and running this action locally on an unsupported environment yields an error that looks like: - ```text - Syntax error: end of file unexpected (expecting ")") - ``` + ```text + Syntax error: end of file unexpected (expecting ")") + ``` - When adding the action, make sure to first check out your repo with `actions/checkout@v4`. -Otherwise, it could fail at the `propose-version` step with the message: + Otherwise, it could fail at the `propose-version` step with the message: - ```text - error: Could not automatically determine release name - ``` + ```text + error: Could not automatically determine release name + ``` - In `actions/checkout@v4` the default fetch depth is 1. If you're getting the error message: - ```text - error: Could not find the SHA of the previous release in the git history. Increase your git clone depth. - ``` + ```text + error: Could not find the SHA of the previous release in the git history. Increase your git clone depth. + ``` - you can fetch all history for all branches and tags by setting the `fetch-depth` to zero like so: + you can fetch all history for all branches and tags by setting the `fetch-depth` to zero like so: - ```yaml - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ``` + ```yaml + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ``` - Not finding the repository @@ -176,12 +188,12 @@ Otherwise, it could fail at the `propose-version` step with the message: Ensure you use `actions/checkout` before running the action ```yaml - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: getsentry/action-release@v3 - with: - environment: 'production' - release: 'v1.0.1' - ``` + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: getsentry/action-release@v3 + with: + environment: 'production' + release: 'v1.0.1' + ``` diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index fb6abdc2..aa59ae77 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -11,6 +11,7 @@ import { getProjects, getUrlPrefixOption, getWorkingDirectory, + getSetCommitsManualOptions, } from '../src/options'; describe('options', () => { @@ -196,13 +197,37 @@ describe('options', () => { process.env['INPUT_SET_COMMITS'] = 'skip'; expect(getSetCommitsOption()).toBe('skip'); }); + it('manual', () => { + process.env['INPUT_SET_COMMITS'] = 'manual'; + expect(getSetCommitsOption()).toBe('manual'); + }); it('bad option', () => { - const errorMessage = 'set_commits must be "auto" or "skip"'; + const errorMessage = 'set_commits must be "auto", "skip" or "manual"'; process.env['INPUT_SET_COMMITS'] = 'bad'; expect(() => getSetCommitsOption()).toThrow(errorMessage); }); }); + describe('getSetCommitsManualOptions', () => { + afterEach(() => { + delete process.env['INPUT_SET_COMMITS']; + delete process.env['INPUT_REPO']; + delete process.env['INPUT_COMMIT']; + delete process.env['INPUT_PREVIOUS_COMMIT']; + }); + it('manual', () => { + process.env['INPUT_SET_COMMITS'] = 'manual'; + process.env['INPUT_REPO'] = 'repo'; + process.env['INPUT_COMMIT'] = 'commit'; + process.env['INPUT_PREVIOUS_COMMIT'] = 'previous-commit'; + expect(getSetCommitsManualOptions()).toEqual({ + repo: 'repo', + commit: 'commit', + previousCommit: 'previous-commit', + }); + }); + }); + describe('getProjects', () => { afterEach(() => { delete process.env['SENTRY_PROJECT']; diff --git a/action.yml b/action.yml index caa6d770..d3aede13 100644 --- a/action.yml +++ b/action.yml @@ -76,7 +76,23 @@ inputs: set_commits: description: |- Specify whether to set commits for the release. - One of: "auto", "skip", "repo-owner/repo-name@commit", "repo-owner/repo-name@.." + When "manual", you need to provide the repository, commit, and previous commit. + One of: "auto", "skip", "manual" + required: false + repo: + description: |- + The repository to set commits for in "repo-owner/repo-name" format. + Only used when "set_commits" is "manual". + required: false + commit: + description: |- + The commit SHA of the current release you are creating. + Only used when "set_commits" is "manual". + required: false + previous_commit: + description: |- + The commit SHA of the previous release. + Required when "set_commits" is "manual". required: false projects: description: |- @@ -142,6 +158,9 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} + INPUT_REPO: ${{ inputs.repo }} + INPUT_COMMIT: ${{ inputs.commit }} + INPUT_PREVIOUS_COMMIT: ${{ inputs.previous_commit }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} @@ -204,6 +223,9 @@ runs: INPUT_VERSION_PREFIX: ${{ inputs.version_prefix }} INPUT_RELEASE_PREFIX: ${{ inputs.release_prefix }} INPUT_SET_COMMITS: ${{ inputs.set_commits }} + INPUT_REPO: ${{ inputs.repo }} + INPUT_COMMIT: ${{ inputs.commit }} + INPUT_PREVIOUS_COMMIT: ${{ inputs.previous_commit }} INPUT_PROJECTS: ${{ inputs.projects }} INPUT_URL_PREFIX: ${{ inputs.url_prefix }} INPUT_STRIP_COMMON_PREFIX: ${{ inputs.strip_common_prefix }} diff --git a/dist/index.js b/dist/index.js index 2287478b..102c0ce7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -122748,22 +122748,25 @@ const telemetry_1 = __nccwpck_require__(12417); } core.debug(`Release version is ${release}`); yield (0, cli_1.getCLI)().new(release, { projects }); - Sentry.setTag('set-commits', setCommitsOption.get('mode')); - if (setCommitsOption.get('mode') === 'manual') { - yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { - core.debug(`Setting commits with options '${setCommitsOption}'`); - const previousCommit = setCommitsOption.get('previous_commit'); - yield (0, cli_1.getCLI)().setCommits(release, Object.assign({ auto: false, repo: setCommitsOption.get('repo'), commit: setCommitsOption.get('commit') }, (previousCommit && { previousCommit }))); - })); - } - else if (setCommitsOption.get('mode') !== 'skip') { + Sentry.setTag('set-commits', setCommitsOption); + if (setCommitsOption !== 'skip') { yield (0, telemetry_1.traceStep)('set-commits', () => __awaiter(void 0, void 0, void 0, function* () { core.debug(`Setting commits with option '${setCommitsOption}'`); - yield (0, cli_1.getCLI)().setCommits(release, { - auto: true, - ignoreMissing, - ignoreEmpty, - }); + if (setCommitsOption === 'auto') { + yield (0, cli_1.getCLI)().setCommits(release, { + auto: true, + ignoreMissing, + ignoreEmpty, + }); + } + else if (setCommitsOption === 'manual') { + const { repo, commit, previousCommit } = options.getSetCommitsManualOptions(); + if (!repo || !commit) { + throw new Error('Options `repo` and `commit` are required when `set_commits` is `manual`'); + } + yield (0, cli_1.getCLI)().setCommits(release, Object.assign({ auto: false, repo, + commit }, (previousCommit && { previousCommit }))); + } })); } Sentry.setTag('sourcemaps', sourcemaps.length > 0); @@ -122867,7 +122870,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; +exports.getWorkingDirectory = exports.getUrlPrefixOption = exports.getProjects = exports.checkEnvironmentVariables = exports.getSetCommitsManualOptions = exports.getSetCommitsOption = exports.getBooleanOption = exports.getDist = exports.getSourcemaps = exports.getStartedAt = exports.getEnvironment = exports.getRelease = void 0; const core = __importStar(__nccwpck_require__(42186)); const path_1 = __importDefault(__nccwpck_require__(71017)); const cli_1 = __nccwpck_require__(56733); @@ -122989,49 +122992,31 @@ const getBooleanOption = (input, defaultValue) => { exports.getBooleanOption = getBooleanOption; const getSetCommitsOption = () => { let setCommitOption = core.getInput('set_commits'); - // Default to "auto" if the input is empty or undefined + // default to auto if (!setCommitOption) { - return new Map([['mode', 'auto']]); + return 'auto'; } - // Convert input to lower case for uniformity - setCommitOption = setCommitOption.trim().toLowerCase(); - // Create a map for the output structure - const result = new Map(); - // Handle the different cases for set_commits + // convert to lower case + setCommitOption = setCommitOption.toLowerCase(); switch (setCommitOption) { case 'auto': - result.set('mode', 'auto'); - break; + return 'auto'; case 'skip': - result.set('mode', 'skip'); - break; - default: { - // Handle repo-owner/repo-name@commit or commit range - const regex = /^([\w\-]+\/[\w\-]+)@([\w\-.]+(?:\.\.|@[\w\-.]+)?)$/; - const match = regex.exec(setCommitOption); - if (!match) { - throw new Error('Invalid value for set_commits. Expected "auto", "skip", or "repo-owner/repo-name@commit" / "repo-owner/repo-name@..".'); - } - // Parse repo and commit(s) from the input - const [, repository, commitRange] = match; - result.set('mode', 'manual'); - result.set('repository', repository); - if (commitRange.includes('..')) { - // Handle commit range - const [previousCommit, currentCommit] = commitRange.split('..'); - result.set('previous_commit', previousCommit); - result.set('commit', currentCommit); - } - else { - // Single commit - result.set('commit', commitRange); - } - break; - } + return 'skip'; + case 'manual': + return 'manual'; + default: + throw Error('set_commits must be "auto", "skip" or "manual"'); } - return result; }; exports.getSetCommitsOption = getSetCommitsOption; +const getSetCommitsManualOptions = () => { + const repo = core.getInput('repo'); + const commit = core.getInput('commit'); + const previousCommit = core.getInput('previous_commit'); + return { repo, commit, previousCommit }; +}; +exports.getSetCommitsManualOptions = getSetCommitsManualOptions; /** * Check for required environment variables. */ diff --git a/src/main.ts b/src/main.ts index c9c313e8..0bf8ac44 100644 --- a/src/main.ts +++ b/src/main.ts @@ -45,27 +45,32 @@ withTelemetry( core.debug(`Release version is ${release}`); await getCLI().new(release, { projects }); - Sentry.setTag('set-commits', setCommitsOption.get('mode')); + Sentry.setTag('set-commits', setCommitsOption); - if (setCommitsOption.get('mode') === 'manual') { - await traceStep('set-commits', async () => { - core.debug(`Setting commits with options '${setCommitsOption}'`); - const previousCommit = setCommitsOption.get('previous_commit'); - await getCLI().setCommits(release, { - auto: false, - repo: setCommitsOption.get('repo'), - commit: setCommitsOption.get('commit'), - ...(previousCommit && { previousCommit }), - }); - }); - } else if (setCommitsOption.get('mode') !== 'skip') { + if (setCommitsOption !== 'skip') { await traceStep('set-commits', async () => { core.debug(`Setting commits with option '${setCommitsOption}'`); - await getCLI().setCommits(release, { - auto: true, - ignoreMissing, - ignoreEmpty, - }); + + if (setCommitsOption === 'auto') { + await getCLI().setCommits(release, { + auto: true, + ignoreMissing, + ignoreEmpty, + }); + } else if (setCommitsOption === 'manual') { + const { repo, commit, previousCommit } = options.getSetCommitsManualOptions(); + + if (!repo || !commit) { + throw new Error('Options `repo` and `commit` are required when `set_commits` is `manual`'); + } + + await getCLI().setCommits(release, { + auto: false, + repo, + commit, + ...(previousCommit && { previousCommit }), + }); + } }); } diff --git a/src/options.ts b/src/options.ts index 3b09783d..77d23f36 100644 --- a/src/options.ts +++ b/src/options.ts @@ -127,60 +127,33 @@ export const getBooleanOption = (input: string, defaultValue: boolean): boolean throw Error(`${input} is not a boolean`); }; -export const getSetCommitsOption = (): Map => { +export const getSetCommitsOption = (): 'auto' | 'skip' | 'manual' => { let setCommitOption = core.getInput('set_commits'); - - // Default to "auto" if the input is empty or undefined + // default to auto if (!setCommitOption) { - return new Map([['mode', 'auto']]); + return 'auto'; } - - // Convert input to lower case for uniformity - setCommitOption = setCommitOption.trim().toLowerCase(); - - // Create a map for the output structure - const result = new Map(); - - // Handle the different cases for set_commits + // convert to lower case + setCommitOption = setCommitOption.toLowerCase(); switch (setCommitOption) { case 'auto': - result.set('mode', 'auto'); - break; + return 'auto'; case 'skip': - result.set('mode', 'skip'); - break; - default: { - // Handle repo-owner/repo-name@commit or commit range - const regex = /^([\w\-]+\/[\w\-]+)@([\w\-.]+(?:\.\.|@[\w\-.]+)?)$/; - const match = regex.exec(setCommitOption); - - if (!match) { - throw new Error( - 'Invalid value for set_commits. Expected "auto", "skip", or "repo-owner/repo-name@commit" / "repo-owner/repo-name@..".' - ); - } - - // Parse repo and commit(s) from the input - const [, repository, commitRange] = match; - result.set('mode', 'manual'); - result.set('repository', repository); - - if (commitRange.includes('..')) { - // Handle commit range - const [previousCommit, currentCommit] = commitRange.split('..'); - result.set('previous_commit', previousCommit); - result.set('commit', currentCommit); - } else { - // Single commit - result.set('commit', commitRange); - } - break; - } + return 'skip'; + case 'manual': + return 'manual'; + default: + throw Error('set_commits must be "auto", "skip" or "manual"'); } - - return result; }; +export const getSetCommitsManualOptions = (): { repo: string; commit: string; previousCommit: string } => { + const repo = core.getInput('repo'); + const commit = core.getInput('commit'); + const previousCommit = core.getInput('previous_commit'); + + return { repo, commit, previousCommit }; +}; /** * Check for required environment variables. */ From 792f1611c0f11d6220fc7de6bbdd099e5359c624 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 31 Oct 2025 10:04:05 +0100 Subject: [PATCH 07/10] Limit perimissions for e2e tests --- .github/workflows/build.yml | 13 +++++++++++++ action.yml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d1a5dbb..bfcd3c97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,6 +143,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read name: Test current action steps: - uses: actions/checkout@v4 @@ -160,6 +162,8 @@ jobs: test-runs-on-container: needs: docker-build runs-on: ubuntu-latest + permissions: + contents: read container: image: node:20.19.2 @@ -183,6 +187,8 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} name: Mock a release + permissions: + contents: read steps: - uses: actions/checkout@v4 with: @@ -202,6 +208,8 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} name: Mock a release in a different working directory + permissions: + contents: read steps: - name: Checkout directory we'll be running from uses: actions/checkout@v4 @@ -231,6 +239,8 @@ jobs: node-version: ['20.x', '22.x'] runs-on: ${{ matrix.os }} name: Test Node version preserved on ${{ matrix.os }} with Node ${{ matrix.node-version }} + permissions: + contents: read steps: - uses: actions/checkout@v4 with: @@ -271,11 +281,14 @@ jobs: test-manual-commit-range: needs: docker-build + strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} name: Test manual commit range + permissions: + contents: read steps: - uses: actions/checkout@v4 with: diff --git a/action.yml b/action.yml index d3aede13..b10ce2e9 100644 --- a/action.yml +++ b/action.yml @@ -167,7 +167,7 @@ runs: INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }} INPUT_DISABLE_TELEMETRY: ${{ inputs.disable_telemetry }} INPUT_DISABLE_SAFE_DIRECTORY: ${{ inputs.disable_safe_directory }} - uses: docker://ghcr.io/getsentry/action-release-image:feature-add-manual-commit-range + uses: docker://ghcr.io/getsentry/action-release-image:ab-add-manual-commit-range # For actions running on macos or windows runners, we use a composite # action approach which allows us to install the arch specific sentry-cli From 5e6ae0338e1718e03de2e2d1d0cea02b4d66ee71 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 31 Oct 2025 10:08:12 +0100 Subject: [PATCH 08/10] Add changelog entry --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3638f9..f8bfbfe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.4.0 + +- feat: Add support for setting manual commit range (#291) by @andreiborza + +Work in this release was contributed by @trevorkwhite. Thank you for your contribution! + ## 3.3.0 ### Various fixes & improvements @@ -7,6 +13,8 @@ - chore: pin cache action (#290) by @saibotk - chore: Set docker tag for master [skip ci] (ae1d1cd5) by @getsantry[bot] +Work in this release was contributed by @saibotk. Thank you for your contribution! + ## 3.2.0 ### Various fixes & improvements From 42189e0bafb32d2cf650773a4f67d5b7732b9e97 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 31 Oct 2025 10:12:03 +0100 Subject: [PATCH 09/10] Add missing auth token --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfcd3c97..85fbe9e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -296,6 +296,9 @@ jobs: - name: Create a release with manual commit range uses: ./ + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_LOG_LEVEL: debug with: environment: production set_commits: manual From fc297d6772ff99b062aff565bda89e914acac661 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 31 Oct 2025 10:37:01 +0100 Subject: [PATCH 10/10] Set e2e test as mock --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85fbe9e8..a076d924 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -299,6 +299,7 @@ jobs: env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_LOG_LEVEL: debug + MOCK: true with: environment: production set_commits: manual