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

Function for not publishing on given merges to master? #10

Open
trygve-lie opened this issue Dec 4, 2019 · 2 comments
Open

Function for not publishing on given merges to master? #10

trygve-lie opened this issue Dec 4, 2019 · 2 comments

Comments

@trygve-lie
Copy link

Can we somehow make it so its possible to exclude certain merges?

What I am looking into doing is having an automatic publish when there are code / doc / dependency changes, but not doing a publish when ex dev dependencies is updated from a bot like Renovate or Greenkeeper.

@mikeal
Copy link
Owner

mikeal commented Dec 4, 2019

If the difference is based on the files changed you should just be able to use filtering in the actions themselves.

For something like only devDependencies changes that would be more difficult. It should certainly be possible, using either action filters or adding code to merge-release, to exclude commits from PR’s with specific labels which would work for greenkeeper PR’s.

@mikeal
Copy link
Owner

mikeal commented Dec 4, 2019

Did a little digging, this is all a bit dependent on your complete workflow.

As far as excluding very specific things, like if only the devDeps were changed, what you may want to do is write a Node.js script that will pass/fail based on this specific logic and publish it to npm as a CLI. You can then use npx in a shell call inside run in order to do the filter and overwrite the default action, making the entrypoint.sh only run when the filter is true.

 - run: |
    if [ npx trygveShouldPublish ]; then
      ./entrypoint.sh
    fi

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

No branches or pull requests

2 participants