nu_scripts/make_release
Igor 13f2c47135
Port before_v0.60/make_release folder (#830)
This PR is part of porting all old scripts #221 and ports `make_release`
folder
## Summary

### make_release/this_week_in_nu_weekly.nu
This script has already been ported and has received some updates: #433.
So I just removed it
```yaml
from: before_v0.60/make_release/this_week_in_nu_weekly.nu
to: make_release/this_week_in_nu_weekly.nu
functions:
    do-work: make_release/this_week_in_nu_weekly.nu:1:query-week-span
```

### make_release/this_week_in_nu_release.nu

I have ported this, but I'm not sure if we need it because it has
strange name and we have `prs.nu` and `make_release/release-note/`

```yaml
from: before_v0.60/make_release/this_week_in_nu_release.nu
to: make_release/this_week_in_nu_release.nu
functions:
    do-work: make_release/this_week_in_nu_release.nu:1:do-work
```

### make_release/nu_release.nu

This has already been ported to `make_release/nu_release.nu` and has
received new updates #828 so I just removed it

```yaml
from: before_v0.60/make_release/nu_release.nu
to: make_release/nu_release.nu
```

### make_release/gen-js-ext.nu
This has already been moved to `make_release/gen-js-ext.nu` and has
received new updates #621 but not completely ported so I have ported it
- pipeline `for` to `each`
- `$nu.scope.commands` to `scope commands`
- explicit `print`
```yaml
from: before_v0.60/make_release/gen-js-ext.nu
to: make_release/gen-js-ext.nu
functions:
  gen_keywords: make_release/gen-js-ext.nu:1:gen_keywords
  gen_sub_keywords: make_release/gen-js-ext.nu:20:gen_sub_keywords
```

### make_release/gen-ts-ext.nu
I have ported this script
```yaml
from: before_v0.60/make_release/gen-ts-ext.nu
to: make_release/gen-ts-ext.nu
functions:
  gen-ts-cmds-begin: make_release/gen-ts-ext.nu:1:gen-ts-cmds-begin
  gen-ts-cmds: make_release/gen-ts-ext.nu:18:gen-ts-cmds
  gen-ts-subs: make_release/gen-ts-ext.nu:40:gen-ts-subs
```
2024-05-13 09:53:13 -04:00
..
release-note use typos for corrections (#833) 2024-05-08 06:47:54 -05:00
20k_club.nu use typos for corrections (#833) 2024-05-08 06:47:54 -05:00
bump-version.nu Add nu_plugin_nu_example to bump-version.nu (#822) 2024-04-19 15:43:09 -05:00
gen-js-ext.nu Port before_v0.60/make_release folder (#830) 2024-05-13 09:53:13 -04:00
gen-ts-ext.nu Port before_v0.60/make_release folder (#830) 2024-05-13 09:53:13 -04:00
get_coverage.nu refactor: (#418) 2023-04-25 17:56:25 -05:00
nu_deps.nu Change nu-deps script to not care about waves (#667) 2023-11-14 18:19:19 +01:00
nu_release.nu Update release script (#828) 2024-04-30 21:43:36 +00:00
prs.nu Add script to generate lists of PRs (#753) 2024-02-06 22:59:46 +02:00
Readme.md Update release script (#828) 2024-04-30 21:43:36 +00:00
this_week_in_nu_release.nu Port before_v0.60/make_release folder (#830) 2024-05-13 09:53:13 -04:00
this_week_in_nu_weekly.nu Port before_v0.60/make_release folder (#830) 2024-05-13 09:53:13 -04:00

The release process of Nushell

0. Release direct dependencies

Note

the following procedure is the same for nu-ansi-term and reedline and needs to be repeated

Warning

release nu-ansi-term before reedline and reedline before Nushell

Note

nu-ansi-term is typically released only when there are changes to publish. reedline is typically released on the same schedule as Nushell.

Note

in the following, dep denotes either the reedline or the nu-ansi-term remote e.g. https://github.com/nushell/reedline or git@github.com:nushell/nu-ansi-term, depending on the dependency being installed

  • bump the version (example with reedline and nu-ansi-term)
  • get the latest revision with git pull dep main
  • publish the crate with cargo publish (need to be a member of the publishing team)
  • tag the project with git tag v0.xx.0
  • push the release tag with git push dep main --tags
  • publish the release (include the (breaking) changes and take inspiration from the other releases)
  • bump the version on the Nushell side (example with reedline) (reference the release notes for courtesy)

1. Minor bump of the version (example)

  • in the repo of Nushell, run /path/to/nu_scripts/make_release/bump-version.nu
  • then, ensure there are no compilation errors with any combination of features by running:
    cargo hack --all --feature-powerset --skip default-no-clipboard,stable,mimalloc check
    
    (this will take a while...)
  • check for build errors by running:
    cargo hack --all build
    
    (this will build each crate with default features)
  • commit changes with bumped versions (this includes changes to Cargo.lock)

2. Tag the nushell repo

Warning

this is maybe the most critical step of the whole release process!! this step, once pushed to GitHub will trigger the release workflows.

Note

in the following, nushell will be used to pull and push to the nushell repo, e.g. the nushell remote would be https://github.com/nushell/nushell or git@github.com:nushell/nushell

  • get the latest version bump commit with git pull nushell main
  • tag the project with git tag 0.xx.0
  • ⚠️ push the release tag to GitHub git push nushell main --tags ⚠️

👉 check the CI jobs 👉 check that there is the same number of targets compared to last release

3. Publish nu to crates.io

  • check the order of dependencies with nushell/nu_scripts/make_release/nu_deps.nu from the nushell repo
  • release the Nushell crates nushell/nu_scripts/make_release/nu_release.nu from the nushell repo

Note

if there is a new crate, you must add it to the github:nushell:publishing group (cargo owner --list)

Note

if a step fails

  • ask the owner to cargo owner --add github:nushell:publishing
  • edit the nu_release.nu script to start again where it failed
  • re-run the script

4. Publish the release note on the website

Note

the scripts have been written in such a way they can be run from anywhere

  • inspect the merged PRs to write changelogs with ./make_release/release-note/list-merged-prs nushell/nushell
  • reorder sections by priority, what makes the most sense to the user?
  • paste the output of ./make_release/release-note/list-merged-prs nushell/nushell --label breaking-change --pretty --no-author to the "Breaking changes" section
  • make sure breaking changes titles are clear enough
  • paste the output of ./make_release/release-note/get-full-changelog to the "Full changelog" section
  • mark as ready for review when uploading to crates.io
  • land when
    • fully uploaded to crates.io
    • before the GitHub release

5. Publish the release on GitHub

  • go to the draft release on the release page
  • grab the message of last one
  • wait for the website to publish the release (in the actions tab and on the website)
  • publish the release on GitHub

6. social media

  • post a status update on Discord
  • tweet about the new release

7. Create the next release note PR on the website

  • run ./make_release/release-note/create-pr 0.xx.0 ((date now) + 4wk | format date "%Y-%m-%d" | into datetime)

8. Bump the version as development

/path/to/nu_scripts/make_release/bump-version.nu --patch

After the release

The main things to do once a release has been published are