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

feat: add ability to unset GITHUB_ACTION env var #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidspek
Copy link

Type of Change

  • New feature
  • Bug fix
  • Documentation
  • Refactor
  • Chore

Resolves

Describe Changes

This PR adds the ability to unset the GITHUB_ACTIONS environment variable. In a number of scenarios it can be useful to validate a PR being merged to a branch will result in a valid release. However, due to the way the detection works in env-ci it will always pick up the branch from GitHub from environment variables that can't be overridden, even when setting ci: false. Removing the GITHUB_ACTIONS environment variable allows semantic release to pickup the branch from Git. This allows for a workflow to checkout the base branch of a PR, do a dummy merge of the PR and then run semantic release in dry-run mode to ensure a valid release would be created if the PR is merged. Such a workflow can be very helpful in environments where pre-commit hooks aren't easy to implement or desirable like open source projects.

Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
@cycjimmy
Copy link
Owner

cycjimmy commented Jan 8, 2025

I will merge this feature into the main branch. Before doing so, can you describe the usage scenario of this parameter in the README file?

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.

Add a flag or some setting that ignores the logic for CI
2 participants