Skip to content
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

fix: replace incorrect branch key with correct branches key in releaserc file #2

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

MichaelRoytman
Copy link
Member

@MichaelRoytman MichaelRoytman commented Aug 3, 2023

The release GitHub action on the previous pull request failed with the following error.

SemanticReleaseError: The release branches are invalid in the `branches` configuration.
    at default (file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/lib/get-error.js:6:10)
    at file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/lib/branches/index.js:45:19
    at Array.reduce (<anonymous>)
    at default (file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/lib/branches/index.js:35:[46](https://github.com/edx/frontend-lib-learning-assistant/actions/runs/5754323807/job/15599367963#step:7:47))
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async run (file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/index.js:68:22)
    at async Module.default (file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/index.js:275:22)
    at async default (file:///home/runner/work/frontend-lib-learning-assistant/frontend-lib-learning-assistant/node_modules/semantic-release/cli.js:55:5) {
  code: 'ERELEASEBRANCHES',
  details: 'A minimum of 1 and a maximum of 3 release branches are required in the [branches configuration](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches).\n' +
    '\n' +
    'This may occur if your repository does not have a release branch, such as `master`.\n' +
    '\n' +
    'Your configuration for the problematic branches is `[]`.',
  semanticRelease: true
}

I copied the .releaserc file from frontend-lib-special-exams and forgot to rename branch to branches. branches is used by semantic-release to determine which Git branches to release; see here. This is necessary because we release on a non-standard main branch - not master.

@MichaelRoytman MichaelRoytman force-pushed the michaelroytman/MST-2030-fix-releaserc branch from 8350b76 to 2cec826 Compare August 3, 2023 19:44
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #2 (2cec826) into main (987a3c7) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main      #2   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          2       2           
  Lines          7       7           
=====================================
  Misses         7       7           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@MichaelRoytman MichaelRoytman merged commit a41fcf8 into main Aug 3, 2023
5 checks passed
@MichaelRoytman MichaelRoytman deleted the michaelroytman/MST-2030-fix-releaserc branch August 3, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants