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

automate patch-level release #1515

Closed
wants to merge 1 commit into from
Closed

automate patch-level release #1515

wants to merge 1 commit into from

Conversation

namusyaka
Copy link
Member

@namusyaka namusyaka commented Jan 12, 2019

Hello @sinatra friends!
I've been working on the automation recently, and right now I confirmed the automation works correctly, so I would like to get your feedback!

Background: #1510

This change offers two features.

  1. Automate to upgrade CHANGELOG.md and VERSION for next patch level release.
  2. Execute rake release:all to publish all gems.

We're now able to cut a patch-level release easily by using github labels:

release/patch

  • If the pull request has this label and gets merged, new patch version will be released. (e.g. v2.0.6)

release/candidate

  • If the pull request has this label and gets merged, new version will be released as release-candidate. (e.g. v2.0.6.rc)

release-note

  • The automation script will automatically generate the CHANGELOG entry.
  • The script will collect pull requests for generating entry by whether the label has been attached or not.

Before merging this, we need to check some points for reducing troubles.

We need to check that required access has been granted for @sinatra-bot.
@sinatra-bot should be:

  • Added as a collaborator (read/write) into this repository
  • Added an owner to sinatra, sinatra-contrib and rack-protection gems in rubygems.org.

Then, I have a private key for @sinatra-bot, and it must be encrypted and be committed to this repository for accessing to this repository from travisci, so we need encrypt the private key by travis encrypt-file [PEM]. You can see more details in .travis.yml and release.sh.


Last, thanks for taking a look at this pull request. If you have more time, please review the codes, the structure, and actual automation workflow at https://github.com/sinatra-bot/sandbox.
I'm looking forward to get your feedback!

Thanks,

By this commit, we're now able to cut a patch-level release easily by
using github labels. Some labels are available:

"release/patch"
- If the pull request has this label and gets merged, new patch version
will be released.

"release/candidate"
- If the pull request has this label and gets merged, new version will
be released as release-candidate.

"release-note"
- The automation script will automatically generate CHANGELOG entry.
- The script will collect pull requests for generating entry by whether the label has been attached or not.
Copy link
Member

@jkowens jkowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like where this is going. LGTM 👍

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice, I asked a question about an output.

This looks like a fine workflow.

load "ci/release.rb"
sh <<-SH
echo "---\n:rubygems_api_key: #{ENV['RUBYGEMS_API_KEY']}" > ~/.gem/credentials
cat ~/.gem/credentials
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need output here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally forgot about this, but seems a debug code to me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to take a look in a few days.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just went over this again, and noted our conversation here. Good to see your avatar again. Hope things are good! 👋

@namusyaka
Copy link
Member Author

Closing this as we should use Github Actions now.

@namusyaka namusyaka closed this Jul 5, 2020
@namusyaka namusyaka deleted the release-automation branch September 23, 2020 08:49
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

Successfully merging this pull request may close these issues.

None yet

3 participants