Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vilmibm
Copy link
Contributor

@vilmibm vilmibm commented Sep 2, 2020

Proper Linux Repositories

This PR adds automation and documentation around deb and rpm package repositories for gh. The repositories already exist and contain 0.11.1; the next release will use this automation to add 0.12.0 to the repositories.

I chose to add two new workflows that depend on the goreleaser flow. It means there are redundant steps across the three flows but I wanted fault isolation and easier debuggability.

I also did something we've discussed which was pushing "unsupported" linux install methods into their own document; I'd appreciate feedback on the wording used there.

if you want to test this on either debian stable or ubuntu 20.04: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 && sudo apt-add-repository -u https://cli.github.com/packages && sudo apt install gh

To test on Fedora or similar: sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && dnf install gh

closes #1216
closes #834
closes #448


TODONE

  • get proof of concept ported to actions
  • migrate to storing packages via cli.github.com
  • generate new gpg keypair to use for releases
  • figure out how to get focal supported instead of just stable (this will allow add-apt-repository to work on ubuntu)
  • test out using add-apt-repository -k pgp.mit.edu
  • move workflow into releases.yml with appropriate prerelease guards
  • support RPM
  • update installation instructions as needed

@vilmibm vilmibm requested review from ampinsk, mislav and samcoe September 3, 2020 19:59
@vilmibm vilmibm changed the title [WIP] linux repo creation linux repository automation Sep 3, 2020
@vilmibm vilmibm marked this pull request as ready for review September 3, 2020 20:00
- deb and rpm packages are now built for prereleases
- consolidate setup for deb & rpm
- man pages are generated for prereleases
- the `cli.github.com` site is only pushed to on full releases

Bonus:
- only publish the GitHub release after the Windows MSI is uploaded
- hub does not need downloading
Our tap is now deprecated in favor of `gh` from homebrew-core
- Move all Linux installation docs to the separate page to eliminate repetition
- Indicate that only Ubuntu 20.04 is supported for apt-add-repository method
- Pull openSUSE/SUSE out of the "unofficial" section since it refers to
  downloading our official packages
- Point out manual installation methods as well
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Thank you for the hard work, @vilmibm!

I have pushed some updates:

  • Deb & RPM packages are now published as part of the main goreleaser job. This allows us to consolidate the duplication in setup (primarily around GPG).

  • The i3h/download-release-asset dependency is eliminated. Adding a 3rd-party Action to our release workflow is risky because it could modify our binaries, and also the action was configured to download the binaries from the latest Release tag, which might not necessarily match the actual git tag being pushed.

  • We now only push to our Pages site once instead of 3 times (man pages + deb + rpm). This eliminates the potential race condition where rpm-repos and deb-repos jobs running in parallel could potentially try to push to the site at the same time.

  • Most of our release workflow is now exercised for pre-releases, except:

    • The Pages site gets updated locally, but never published;
    • Projects cards are queried, but never actually moved.
  • The final Release is only published after the MSI file gets uploaded. Before, Windows users could potentially get informed about a new release before the MSI installer becomes available.

  • I have moved all Linux installation instructions to the separate doc to avoid duplication and make community contributions easier. I have also added a hint to Ubuntu installation instructions that only Ubuntu 20.04 is currently supported from our sources.

@mislav mislav merged commit 22b3ce6 into trunk Sep 8, 2020
@mislav mislav deleted the linux-pkg branch September 8, 2020 07:57
@jglick
Copy link

jglick commented Sep 8, 2020

Just installed the Debian package and found the executable at /usr/local/bin/gh, which is wrong; should be /usr/bin/gh.

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.

Create a yum repository for Linux installation RPM package is not signed Provide deb/rpm repositories

7 participants