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
Upload release with the API token #216
Comments
Hi Mikan, and thanks for asking ! This is correct, uploading a site happens with the API and deleting a release requires an API token. This has been discussed in #167. What we're thinking about is to add a |
For sure ! We'll add a scope for this endpoint so you can use it with the API as well. What would be really cool if that you share your script with us when you're done with it. We (or you, if interested) could write a Github actions with this so people can just specify their token, siteId, url etc and it would handle both upload and delete for PRs while keeping the main branch active. That said, for safety reasons, we would probably by default prevent someone from deleting the main branch of a site via the API, and you could disable this behavior from your site settings. |
Ok, that sounds good :) Thank you for your great work! Yes, actually, I need it for our company's Github Action, so once the changes are done, and Action will be ready, I will be happy to share it with the community. Even if we need it primarily for branch previews (not only on PR but also for any branch create and push), I'll try to make this Action as universal as possible. Also, I'll prepare Github Action workflows examples for various scenarios. |
We made our first try of Github Action: |
@littlewall wow ! This is amazing ! I'll work on this issue early this week and release by the end of the week. I've noticed that you rewrote some logic that we have in our CLI. We'll update our CLI to expose methods for using it inside JS. This might make it easier for you. |
# [1.0.0-beta.23](v1.0.0-beta.22...v1.0.0-beta.23) (2021-05-21) ### Bug Fixes * cannot upload or delete logo (closes [#230](#230)) ([970e1f4](970e1f4)) * incorrect description and missing info in package.json ([#227](#227)) ([290de80](290de80)) * wrong site / branch url in ui ([d33f03f](d33f03f)) ### Features * allow deleting branches with site token ([b107ed7](b107ed7)) * update DomainForm with private key help text ([#231](#231)) ([da4562d](da4562d)) * upload release with api token ([#216](#216)) ([#225](#225)) ([1d5ceb6](1d5ceb6))
🎉 This issue has been resolved in version 1.0.0-beta.23 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Hello,
If I get it right, to upload the release through the API endpoint
POST /api/v1/sites/:siteId:/releases
, I have to provide a site token instead of an API token (even with the enabled release.upload scope). Is that a purpose?Why I'm asking - in custom Github Action, if I want to handle both uploading and removing releases, I have to set both tokens (site token and API token). It would be more convenient to use only the API token for both operations.
Thanks for the consideration,
Milan Zítka
The text was updated successfully, but these errors were encountered: