Skip to content

Commit

Permalink
CONTRIBUTING: add step to update UG config (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Aug 6, 2022
1 parent 87cb556 commit ea453e2
Showing 1 changed file with 34 additions and 28 deletions.
62 changes: 34 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- cSpell:ignore docsy userguide -->

# How to Contribute

We'd love to accept your patches and contributions to this project. There are
Expand Down Expand Up @@ -29,35 +31,37 @@ This project follows

## How to contribute

See the [contribution
guidelines](https://www.docsy.dev/docs/contribution-guidelines/)
in the Docsy user guide.
See the [contribution guidelines][] in the Docsy user guide.

## Publishing a release

These notes are WIP for creating a release (v0.X.Y) from a local copy of the
repo.

1. Change directory to your local Docsy repo and ensure that you're on a branch
and at the commit that you want to tag as the next release (usually
`@HEAD`).
1. Change directory to your local Docsy repo.
2. Ensure that the [CHANGELOG](CHANGELOG.md) has a release summary entry for
v0.X.Y. If not, create one with a brief summary of breaking changes using
the section template at the end of the file. (Note that change details are
autogenerated by GitHub in a later step.)
3. Update the Hugo module versions to v0.X.Y.
4. Update the NPM package version in [package.json](package.json) to 0.X.Y.
3. Update module and package versions:
- Update the version of `docsy/dependencies` in [go.mod](go.mod) to v0.X.Y.
- Update the NPM package version in [package.json](package.json) to 0.X.Y.
4. Update the Docsy `version` in [userguide/config.toml][] to 0.X.Y.
5. Commit your changes, usually as a PR entitled "Release v0.X.Y preparation".
Once the PR is approved and merged, proceed with the remaining steps.
6. Create the tags for v0.X.Y (we currently need two):
6. Ensure that you're:
- On the default branch
- At the commit that you want to tag as the next release (usually `@HEAD`).
7. Create the tags for v0.X.Y (we currently need two):

```sh
REL=v0.X.Y
git tag $REL
git tag dependencies/$REL
```

7. Push the new tags to the main repo (which is named `upstream` in my setup):
8. Push the new tags to the main repo (which is named `upstream` in the
following setup):

```console
$ git push upstream $REL && git push upstream dependencies/$REL
Expand All @@ -66,28 +70,30 @@ repo.
* [new tag] dependencies/v0.X.Y -> dependencies/v0.X.Y
```

8. Use the GitHub [Draft a new release][] feature, filling in the fields as
9. Use the GitHub [Draft a new release][] feature, filling in the fields as
follows:

- From the **release/tag dropdown**: Select the new release tag that you just
pushed, v0.X.Y.
- Set the **release title** to the release number (without the "v").
- Click "auto-generate release notes" to get the release details.
- Replace the auto-generated "## What's Changed" heading by the following:
- From the **release/tag dropdown**: Select the new release tag that you
just pushed, v0.X.Y.
- Set the **release title** to the release number (without the "v").
- Click "auto-generate release notes" to get the release details.
- Replace the auto-generated "## What's Changed" heading by the following:

```markdown
## Release summary
```markdown
## Release summary

See, https://github.com/google/docsy/blob/main/CHANGELOG.md#0XY
See, https://github.com/google/docsy/blob/main/CHANGELOG.md#0XY

## Commit details
```
## Commit details
```

- Replace the `0XY` anchor target above with a target appropriate for this
release.
- Remove the "New contributors" autogenerated text (if present) since we
don't publish that as part of our release notes.
- Select **Create a discussion for this release**.
- Click **Publish release**.
- Replace the `0XY` anchor target above with a target appropriate for this
release.
- Remove the "New contributors" autogenerated text (if present) since we
don't publish that as part of our release notes.
- Select **Create a discussion for this release**.
- Click **Publish release**.

[draft a new release]: https://github.com/google/docsy/releases/new
[contribution guidelines]: https://www.docsy.dev/docs/contribution-guidelines/
[Draft a new release]: https://github.com/google/docsy/releases/new
[userguide/config.toml]: userguide/config.toml

0 comments on commit ea453e2

Please sign in to comment.