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
Add GitHub actions to recipes #1317
Conversation
Hey I appreciate you squashing your commits to allow for rebase and merge, but while we still discuss it would actually be helpful to add commits so I can see your changes since my last review. |
@gr2m Changed. Could you review again, please? What do you think about that section about Tks! |
I would really appreciate if you would write a description without mentioning
I like it. You could add a separate section and call it something like |
@gr2m yeah, indeed. I made your suggestions, please, take a look when possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few more comments. Thanks for bearing with me :)
No problem @gr2m ! Thank you for your review.. If you see any other change, please LMK.. |
It was adding nothing to this docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, otherwise it's good to go :) I'm sure other folks will have suggestions, we can iterate over time as people suggest further improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it might be worth noting a caveat that often makes developer pull hair out of their head, that is: GitHub Actions can't trigger GitHub Actions.
To understand better why that's so painful, imagine the following scenario: there's a merge bot of any kind, that merges PRs with minimal number of approvals, generate docs, does whatever you can automate. Once this PR is merged, releases will not be triggered. Below you can find a link to an Action that merges dependency updates in a repo that uses Semantic Release. No dependency updates are released (see history).
That is a very good point, I've lost some hair over this myself although I know about. We should add a warning |
Co-Authored-By: Natan Sągol <m@merlinnot.com>
@gr2m and @merlinnot , I made your suggestions.. About |
This might give you some more information: https://github.community/t5/GitHub-Actions/Allow-triggering-actions-by-other-actions/td-p/34793 |
docs/recipes/github-actions.md
Outdated
|
||
## Pushing `package.json` changes to `master` branch | ||
|
||
If you want to keep your `package.json` updated in your code versioning with your released version you could use [`@semantic-release/git`](https://github.com/semantic-release/git) plugin. To use it you'll need to generate a [`GITHUB_TOKEN`](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) with [permission to push changes to `master` branch](https://help.github.com/en/articles/enabling-branch-restrictions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can still improve this message. It suggest that users have to create this token manually in this case, but the default one already has these permissions. Do you think we can rephrase it somehow, so it's more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, good point.. I'll think about it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with the provided GITHUB_TOKEN
is that it cannot push to master if you have branch protection enabled. For that you need to create a personal access token.
You can rephrase it and say
To use it you'll need to generate a personal access token with permission to push changes to
master
branch. Store the personal access token as a secret, then set theGITHUB_TOKEN
environment variable from it (instead of from the providedGITHUB_TOKEN
secret)
env:
GITHUB_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gr2m , I changed with your changes. Please, take a look what do you think guys. @merlinnot
hum, makes sense to work for me, I'm using a specific Do you think, @merlinnot, that we could add some reference or a kind of "warn" about this? |
I think it’s becoming very common to have master branch protection enabled. What functionality exactly requires “pushing to master”? |
@rarkins Yes, it's very common. I faced this problem when I needed to push my |
Co-authored-by: Gregor Martynus <gregor@martynus.net>
@alissonperez I opened a PR which should hopefully shed some light on what's broken with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a very good start! Let's see what issues people start to open and improve the guide based on this feedback?
Yes, awesome!! Indeed! thanks @merlinnot ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship it 👏
docs(recipes): GitHub actions (semantic-release#1317)
🎉 This PR is included in version 15.13.28 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 16.0.0-beta.27 🎉 The release is available on: Your semantic-release bot 📦🚀 |
related #974
Just add a simple GitHub Actions recipe.