From 17c47a733de4a15582420d0edaa4a22f52cc84b6 Mon Sep 17 00:00:00 2001 From: Anna Lushnikova Date: Fri, 20 Sep 2024 12:05:49 -0400 Subject: [PATCH] Update Releasing section in contributing (#1577) * Update Releasing section in contributing * create snap readme; add go install github.com/digitalocean/github-changelog-generator@latest ==> list merged PRs since last release to review changes to release --- CONTRIBUTING.md | 51 ++++++++++++------------------------------------- snap/README.md | 20 +++++++++++++++++++ 2 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 snap/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b8fb43f4..8c9563063 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -203,44 +203,17 @@ To cut a release, push a new tag (versioning discussed below). doing (bugfix, feature or breaking). `doctl` follows [semantic versioning](https://semver.org), ask if you aren't sure. -1. Tag the release using `BUMP=(bugfix|feature|breaking) make tag`. - (Bugfix, feature and breaking are aliases for semver's patch, minor and major. - BUMP will also accept `patch`, `minor` and `major`, if you prefer). The command - assumes you have a remote repository named `origin` pointing to this - repository. If you'd prefer to specify a different remote repository, you can - do so by setting `ORIGIN=(preferred remote name)`. - -The new tag triggers the release. - -### Snap - -Snap packages are automatically built and uploaded as part of the GitHub Actions -release workflow. - -To build a snap package locally for testing, first install `snapcraft`. - -On Ubuntu, run: - - sudo snap install snapcraft --classic - -Or on MacOS, run: - - brew install snapcraft - -Finally, build the package by running: - - make snap - -More details about the snap package can be found in the `snap/snapcraft.yaml` file. - -### Updating Homebrew +1. Synchronize your local repository with all the tags that have been created or updated on the remote main branch + ```bash + git checkout main + git pull --tags + ``` -Using the url and sha from the github release, update the -[homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/doctl.rb). -You can use `brew bump-formula-pr doctl`, or +1. Creates a new tag and push the tag to the remote repository named origin + ```bash + git tag # Example: git tag v1.113.0 + git push origin tag # Example: git push origin tag v1.113.0 + ``` -1. fork `homebrew-core` -1. create a branch named `doctl-` -1. update the url and the sha256 using the values for the archive in the github release -1. commit your changes -1. submit a PR to homebrew +To learn a bit more about how that all works, check out [goreleaser](https://goreleaser.com/intro) +and the config we use for it: [.goreleaser.yml](https://github.com/digitalocean/doctl/blob/main/.goreleaser.yml) diff --git a/snap/README.md b/snap/README.md new file mode 100644 index 000000000..f1f2a645f --- /dev/null +++ b/snap/README.md @@ -0,0 +1,20 @@ +# Snap + +Snap packages are automatically built and uploaded as part of the GitHub Actions +release workflow. + +To build a snap package locally for testing, first install `snapcraft`. + +On Ubuntu, run: + + sudo snap install snapcraft --classic + +Or on MacOS, run: + + brew install snapcraft + +Finally, build the package by running: + + make snap + +More details about the snap package can be found in the `snap/snapcraft.yaml` file.