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

Create github release #62

Open
jekuno opened this issue Feb 20, 2017 · 8 comments
Open

Create github release #62

jekuno opened this issue Feb 20, 2017 · 8 comments

Comments

@jekuno
Copy link

jekuno commented Feb 20, 2017

It would be nice if gem-release would offer an option to also create an according new github release when using the gem release command (e.g. via gem release --github).

Github offers a simple API for this purpose. You can automatically create a new Github release using a simple POST, see https://developer.github.com/v3/repos/releases/#create-a-release.

@johnnyshields
Copy link

👍 this would be useful

@svenfuchs
Copy link
Owner

Created a draft here: #73

This is untested (and I do not work with GitHub releases much).

Would anyone care to test this out?

@PikachuEXE
Copy link
Collaborator

@jekuno @johnnyshields
Rebased #73 & fixed heredoc for ruby 2.2
Feel free to test it when available

@johnnyshields
Copy link

Will try it next time I'm releasing a gem. thanks

@piotrb
Copy link

piotrb commented Aug 11, 2020

Just stumbled into this, this is great, my only other request would be to allow the github token to be retrieved from the environment somehow ..

Since I use this for publishing to the github package repository, re-using that mechanism would be great .. so perhaps support getting the token from rubygems credentials the same way the key option does .. or just use ENV['GITHUB_TOKEN'] or some such ..

@PikachuEXE
Copy link
Collaborator

PikachuEXE commented Aug 12, 2020

@piotrb

support getting the token from rubygems credentials the same way the key option does

Can you explain a bit more about this?
Do you mean the --key option? (Use the API key from ~/.gem/credentials)

@piotrb
Copy link

piotrb commented Aug 12, 2020

yes I do .. the --key option .. at least for github uses personal access tokens .. which is the same auth you would want to use to get a github token from ..

Like I said there should probably be 3 options .. (in order of precedence)

  1. GITHUB_TOKEN env var
  2. detect that the push destination is a github package host, if so, get the token from whatever --key is pointing to
  3. take the key directly with --token

@PikachuEXE
Copy link
Collaborator

I am fine with GITHUB_TOKEN as it seems to be used by GitHub CLI too

But --key means Use the API key from ~/.gem/credentials
I think that's not where users are expected to store their GitHub access tokens

For first option we might want to support custom env var name as I found
an issue in GitHub CLI about it

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

5 participants