Skip to content

Commit 8b55306

Browse files
authored
Add a guide for releasing Dioxus (#3384)
* add a release guide * Add note about conferring with community * Add link to cargo-workspaces * Add note about why we use cargo-workspaces * extra note about building docs * add note about docs.rs not building * add note about backports * add note about updating docsite * more notes
1 parent df71924 commit 8b55306

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed

notes/RELEASING.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Releasing Dioxus
2+
3+
Dioxus is big and requires a lot of hand-holding to release. This guide is accurate as of of Dec 17, 2024. As we improve the release process, we'll update this guide.
4+
5+
## Checklist
6+
7+
What we need to release:
8+
- [ ] The dioxus crates in the workspace
9+
- [ ] The docsite and its nightly docs
10+
- [ ] The VSCode Extension
11+
- [ ] Any supporting crates (sdk, include_mdbook, etc)
12+
13+
### Prepping for the release
14+
15+
This involves making sure the metadata of the crates is correct before we publish.
16+
17+
1. [ ] Draft a release post for GitHub (but don't publish it yet)
18+
2. [ ] Make sure every crate has a *complete* Cargo.toml
19+
3. [ ] Make sure shared dependencies are hoisted to the workspace
20+
4. [ ] Pin dependencies that are known to break semver
21+
5. [ ] Make sure no dependencies are `git` or `path` dependencies - all dependencies should be versioned
22+
6. [ ] Make sure all workspace members are listed in the members array of the workspace
23+
7. [ ] Make sure all workspace members are listed in the workspace dependencies list
24+
8. [ ] Make sure all "author" fields are correct
25+
9. [ ] Make sure no assets or READMEs are pointed to outside their respective crates
26+
10. [ ] Run `cargo doc --workspace --no-deps --all-features --document-private-items` to make sure docs can compile
27+
11. [ ] Look through the docs to ensure nothing is glaringly missing or broken
28+
12. [ ] Ensure the crate actually builds the features listed in its docs.rs platform list (we've had [issues where dioxus doesn't build on wasm with --all-features](https://github.com/DioxusLabs/dioxus/issues/3381))
29+
13. [ ] Make sure all the workspace crates are actually owned by either Jonathan Kelley or the Dioxus Labs publish org (`cargo owner --add github:dioxuslabs:publish <crate>`)
30+
14. [ ] If there's *any* crates used by dioxus but not in dioxuslabs/dioxus make sure they're owned by the Dioxus Labs github org in case we need to fix them later
31+
15. [ ] Run through all the examples and make sure they compile and actually *work*. `cargo run --example <example>` and `dx run <example>` should both work.
32+
16. [ ] Install the current CLI version and make sure it works (`cargo install --path packages/cli`). Ideally `cargo update` as well since `crates.io` doesn't use a locked install.
33+
17. [ ] Update the dioxus crate versions to be the intended release version. We set all the versions *manually* instead of relying on `cargo workspaces`. This involves going to `Cargo.toml` and updating the `[workspace.package]` version and each crate's version to the new version in the [workspace.dependencies] section.
34+
18. [ ] Go to the [template repo](http://github.com/dioxusLabs/dioxus-template) and make sure a branch exists for the new major version. IE a v0.5, v0.6, v0.7, etc branch. If it doesn't exist, create it. This *needs* to exist for `dx new` to work. It's likely that this already exists since we tend to try `dx new` frequently before releasing.
35+
19. [ ] If performing a major release, make sure all the links in `dioxus` are updated to point to the new version. This involves basically CTRL-F'ing for `/0.6/` and replacing it with `/0.7/` etc.
36+
20. [ ] It's likely that docsite links might not be updated just yet. If nightly docs are released, there shouldn't need to be any changes. It's fine to bypass the link checker for now, but you should be ready to fix links once the docsite is ready. Any links that are broken are "frozen in time" and will need to be fixed. We can't change links in published crates, so if the link never exists, it's just broken forever.
37+
21. [ ] Inform "VIP" community projects that that a final RC is out (ie projects like [Freya](http://freyaui.dev)) so their authors can test new versions.
38+
39+
### Releasing the workspace:
40+
41+
1. [ ] Make sure all latent commits have been merged into the `main` branch and pushed to github.
42+
2. [ ] Ensure you've published a pre-release of the same code (only necessary for for major releases... patch releases are generally fine to skip a prerelease)
43+
3. [ ] Make sure the version you're releasing is correct (see above)
44+
4. [ ] Make sure you're on the `main` branch (cargo workspaces publish requires you to be on the main branch)
45+
5. [ ] Make sure you have [`cargo-workspaces` installed](https://crates.io/crates/cargo-workspaces). There are other tools but this one is the one we've used in the past. It has some small bugs but is generally reliable. This tool is important because it coordinates the release order of the crates since they depend on each other. Eventually cargo itself will have this functionality, I believe. Unfortunately, there's no way to "dry-run" a workspace publish since crates rely on each other and won't succeed if their dependencies aren't published.
46+
6. [ ] Run the release: `cargo workspaces publish --publish-as-is --allow-dirty --no-git-push --no-individual-tags`. This will publish the crates to crates.io. It might take a while. Only `jkelleyrtp` currently has sufficient rate-limits to publish all the crates at once. If any crate fails, you might need to fix the problems manually and then run the command again. If an error occurs, you might also need to reset the most recent git commit and wipe the tag. `git reset --hard HEAD~1` and `git tag -d <tag>`. Be careful with these commands, especially if you're on the `main` branch.
47+
7. [ ] Once the release is up, commit the most recent changes to the `main` branch and push it.
48+
8. [ ] Also push the tag to the `main` branch. eg `git push origin v0.6.0`
49+
9. [ ] Verify crates.io is showing the new version
50+
10. [ ] Verify `docs.rs` builds the new docs for each crate. IE go to `https://docs.rs/crate/dioxus/latest` and ensure there's no errors. We've had issues before with docs.rs [not building properly](https://docs.rs/crate/dioxus/0.6.0).
51+
11. [ ] Verify you can create a new project with the new version and it works. IE `dx new app`. Do a dry-run of building a new app to make sure it works and no obvious errors are present.
52+
12. [ ] Release the GitHub release using the tag we pushed earlier.
53+
13. [ ] Execute the [`Publish CLI` github action](https://github.com/DioxusLabs/dioxus/actions/workflows/publish.yml) using a manual trigger. Fill in the small form with the appropriate information. This should be the version you just released IE `v0.6.1`. The corresponding github release post must exist for the binstall to be published! You need to be part of the dioxuslabs/publish org to trigger this action.
54+
14. [ ] If you're about to start working on a "dev" version of Dioxus, create a new branch for the last version that we backport fixes to. IE the dioxus repo has a v0.4, v0.5, v0.6, etc branch. We generally only create this branch when we're ready to start merging breaking PRs.
55+
56+
### Releasing the docsite
57+
58+
1. [ ] Stabilize the current docs version on the docsite. This will be manual, unfortunately, and involves changing URLs in the navbar and the sidebar. See [this PR for an example for v0.6](https://github.com/DioxusLabs/docsite/pull/342).
59+
2. [ ] Make sure to update the "current version" and any stability bools in the version switcher.
60+
3. [ ] Update the `deploy.yml` to point to the new binstall version
61+
4. [ ] Remove any latent `git` or `path` dependencies and `crates.io` patches.
62+
5. [ ] todo: discourage any old versions of dioxus from ending up in robots.txt - ideally for better AI support
63+
6. [ ] Move any non-working examples to the relevant `examples/untested` folder.
64+
7. [ ] Update the current `dioxus` version in Cargo.toml (use the docsite as a canary)
65+
8. [ ] run `dx serve` and make sure it works
66+
9. [ ] Commit to main and ensure the build and checks CI passes
67+
10. [ ] Ensure that `ssg` is properly generating *all* the pages. Currently it's flakey and occasionally fails.
68+
11. [ ] Ensure google analytics is working. Check the console and make sure we haven't "gone silent."
69+
12. [ ] Double-check that we're generating OpenGraph images. Twitter/Discord/Reddit/etc will use these images.
70+
71+
### Releasing the vscode extension
72+
73+
This is very manual. In theory it can be automated but I've struggled with the azure portal in the past.
74+
75+
1. [ ] Update the version in `package.json` and `package-lock.json`
76+
2. [ ] Make sure `wasm-bindgen` is installed to current version (`cargo binstall wasm-bindgen-cli`)
77+
3. [ ] Run `npm install` to make sure you install all the dependencies
78+
4. [ ] run `npm run vsix` to create the vsix file
79+
5. [ ] Either use `vsce publish` or manually upload the vsix file to the marketplace
80+
81+
### Releasing ecosystem crates
82+
83+
There are a number of crates that are part of the Dioxus ecosystem that we usually want ready before publishing to reddit/twitter/youtube/etc.
84+
85+
1. [ ] [dioxus-sdk](https://github.com/DioxusLabs/sdk): folks use this and we like to release it with the rest of the ecosystem
86+
2. [ ] [blitz](https://github.com/DioxusLabs/blitz): integrates with dioxus-native and thus dioxus-native needs to be version matched
87+
3. [ ] [taffy](https://github.com/DioxusLabs/taffy): usually exists on its own version system and is used by major projects like Bevy and Zed
88+
4. [ ] [icons](https://github.com/dioxus-community/dioxus-free-icons): a community crate that is usually updated by marc
89+
5. [ ] [use-mounted](https://crates.io/crates/dioxus-use-mounted): a community crate that is usually updated by marc
90+
6. [ ] [resize-observer](https://crates.io/crates/dioxus-resize-observer): a community crate that is usually updated by marc
91+
7. [ ] [charts](https://crates.io/crates/dioxus-charts): a community crate that is usually updated by marc
92+
8. [ ] [lazy](https://crates.io/crates/dioxus-lazy): a community crate that is usually updated by marc
93+
9. [ ] [free-icons](https://crates.io/crates/dioxus-free-icons): a community crate that is usually updated by marc
94+
10. [ ] [query](https://crates.io/crates/dioxus-query): a community crate that is usually updated by marc
95+
11. [ ] [radio](https://crates.io/crates/dioxus-radio): a community crate that is usually updated by marc
96+
12. [ ] [i18n](https://crates.io/crates/dioxus-i18n): a community crate that is usually updated by marc
97+
13. [ ] [clipboard](https://crates.io/crates/dioxus-clipboard): a community crate that is usually updated by marc
98+
14. [ ] [use-computed](https://crates.io/crates/dioxus-use-computed): a community crate that is usually updated by marc
99+
15. [ ] there might be more...
100+
101+
102+
## Marketing
103+
104+
Verify everything works and is ready to go.
105+
- [ ] crates.io is up to date
106+
- [ ] docs.rs is up to date and has no failing builds for major crates (dioxus, dioxus-desktop, dioxus-mobile, etc)
107+
- [ ] github release post is out
108+
- [ ] The relevant GitHub tag is created
109+
- [ ] Any fixes are backported to the relevant branches.
110+
- [ ] binstalls are published to the github release post.
111+
- [ ] `dx new app` plus `dx serve` works out of the box. hot-reload works for rsx and assets.
112+
- [ ] No `wasm-bindgen` errors popup, especially with version bumps.
113+
- [ ] YouTube video is uploaded
114+
- [ ] Ensure open-graph images are generated. Ideally we add custom open-graph images per-release.
115+
116+
Actually marketing:
117+
- [ ] Publish to reddit (usually early morning monday)
118+
- [ ] Publish to twitter
119+
- [ ] Publish to discord in the release-notes channel
120+
- [ ] Publish the youtube video
121+
- [ ] (sometimes) publish to hackernews
122+
123+
## Notes, todos, etc
124+
125+
- We manually bump versions of the crates in the workspace. I don't really trust it to bump automatically, but in theory it is able to do it automatically using the git history. A challenge is crates relying on versions of each other - like core (0.6.2) relying on html (0.6.1) or something like that. This means our releases release the entire crate with no changes, but it does keep every crate in sync with each other.
126+
- We need to expand the rate limit on crates.io for `github:dioxuslabs:publish` to be able to publish all the crates at once.
127+
- We should make stabilizing the docs easier. It's quite manual now.
128+
- We should automate the release of the vscode extension.
129+
- We move examples to the `examples/untested` folder when we release a new version. Ideally we have a workspace with all versions of dioxus and can include the examples in the relevant frames.
130+
- SSG is flakey and occasionally fails. This needs to be fixed.
131+
- We should promote "community" crates to enjoy auto-updates via codemods whenever a new version is released.
132+
- We should be running `docs` CI using DOCS_RS env var to ensure docs are built the same way as docs.rs

0 commit comments

Comments
 (0)