Replies: 8 comments 2 replies
-
Hey, this is what I'm trying to do too, haha 😅 I want to test the I was trying to do
from that message, Then I tried to do switch the branch first:
but the ref still persist to I hope there's some workaround. 🤔 |
Beta Was this translation helpful? Give feedback.
-
In case you're still looking for a workaround, here's what I did with github actions:
I commented on this issue |
Beta Was this translation helpful? Give feedback.
-
Hi ! That's what I'm doing for PR dry-run (using Azure DevOps but others may be similar): # Bash tricks to substitute part of a string...
--branches "${SOURCE_BRANCH#refs/heads/}" I'm removing the |
Beta Was this translation helpful? Give feedback.
-
Hi! Any luck on this using github actions with |
Beta Was this translation helpful? Give feedback.
-
Not sure if it's ideal but got it to work with the following script. Curious if anyone has a better solution!
|
Beta Was this translation helpful? Give feedback.
-
The following snippet did the trick for me.
I based this solution on the library that semantic-release uses to detect CI environments: env-ci. |
Beta Was this translation helpful? Give feedback.
-
Like the above workarounds, I tricked semantic versioning into thinking it is running against a regular branch, "dryrun" but it is actually the pull request reference "refs/pull/${prNumber}/merge". The code below creates the "dryrun" branch, tricks semantic-release by setting GITHUB_REF and finally deletes the branch. Make sure "dryrun" branch is in your .releaserc configuration.
|
Beta Was this translation helpful? Give feedback.
-
Hi all 👋I've created a nice GitHub action workflow, with no additional configuration needed 👍 Here are the workflow results for
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I have been trying to do a semantic-release simulation as a part of the pull request workflow, but bump into issues with the configuration. The configuration for the repository has the following branches configuration:
"branches": ["main"]
Then in the workflow job, I am running semantic-release with the following command:
npx semantic-release --dry-run --no-ci --branches $GITHUB_REF
in hope that it would do the dry-run from the pull request branch github action has checked out. However, I run into the following error:
[4:05:39 PM] [semantic-release] › ✖ ERELEASEBRANCHES The release branches are invalid in the
branches` configuration.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).
This may occur if your repository does not have a release branch, such as master.
Your configuration for the problematic branches is [].`
What am I missing or configuring wrong?
Beta Was this translation helpful? Give feedback.
All reactions