-
Notifications
You must be signed in to change notification settings - Fork 98
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 an action to publish the grammar automatically #98
Conversation
@Luni-4 could you rebase on the latest version? |
Done. |
Can we merge this PR @dcreager? Or does it need to be approved again? |
what about the CI failure on windows? Any idea @Luni-4 ? |
@aryx |
I don't have the permissions to merge without CI passing. I've rerun the job in case it's due to a flakyness but otherwise |
@aryx |
I don't have the permission to set secret tokens on this repo. cc @dcreager @maxbrunsfeld |
cc @patrickt |
Sorry for dropping this thread @Luni-4. I think this is a very good change. Looking at the GH actions configuration settings pages, there are a few decisions to make about "Environment" in which this secret is active. For example, what branches it should be enabled for, and protections on those branches. I can make a decision on that, but I don't have super strong feelings on the security aspects of it. I also have a little bit less time to work on these in the past few months, so I'm wondering if some other stakeholder in these repos can oversee this. @dcreager @rewinfrey @patrickt I'm wondering if your team at GitHub has the cycles to push this effort over the finish line. AFAICT, it entails:
|
No problem! Thanks!
The secret should be assigned to the repository, so if another fork tries to create a tagged version, the GH action doesn't publish anything because the API token is not present in the forked repository.
We can create a GH account called
We can try with the
I'm willing to add this action to every other grammar in this org, unfortunately I will not be able to setup secrets. |
@maxbrunsfeld Can we merge this one please? We need |
Ok, I've added that |
Thank you! Can we bump a |
Just a feedback: the action works on https://github.com/tree-sitter/tree-sitter-c-sharp, here the outcome https://github.com/tree-sitter/tree-sitter-c-sharp/actions/runs/3058879080/jobs/4935595332 |
@aryx @maxbrunsfeld |
Wow, it worked perfectly! Thank you @aryx! When tree-sitter/tree-sitter#1859 (comment) will be ready, I'm going to add the action to every grammar available for tree-sitter |
Checklist:
This PR allows to publish automatically
tree-sitter-java
oncrates.io
when a new tag is set. To make it work, it is just necessary to define theCARGO_REGISTRY_TOKEN
as secret.Thanks in advance for your review! :)