Skip to content
eldesh edited this page Mar 8, 2023 · 15 revisions

(for a project owner \in https://crates.io/teams/github:idein:engineers)

Release Sequence

  1. Read official document
  2. Add your API token to ~/.cargo/credentials with cargo login
  3. Make a release branch
    1. git checkout -b release/x.y.z
  4. Bump up version
    1. Update Cargo.toml > version
    2. cargo build (updating Cargo.lock)
  5. Commit
    1. git add Cargo.toml
    2. git add Cargo.lock
    3. git commit -m "bump up x.y.z"
  6. Check test passing
    $ cargo build
    $ cargo doc
    $ cargo test
    # expensive test
    $ docker-compose build
    $ cargo test -- --ignored
    
    If the "ignored" tests fail with too many open files, try 'ulimit -n 65535'.
  7. Check packaging passing
    $ cargo package
    
  8. Push the branch
    $ git push origin release/x.y.z
    
  9. Make a pull request with following format:
    Bump up the version to `x.y.z`.
    
    # <PR category>
    - <1 line descriprion> #<PR>
    - <1 line description> #<PR>
    ..
    
    where the <PR category> := Improvements | Bugfixes | New Features | etc...
  10. Merge the pull request
  11. Add a new tag (vX.Y.Z)
    $ git tag -a vX.Y.Z
    $ git push origin vX.Y.Z
    
    The annotation should be the same as the body of the PR.
  12. Clone to the new working directory
    $ git clone file:///home/eldesh/dockworker newworker
    $ cd newworker
    $ git checkout vX.Y.Z
    
  13. Packaging (at new working dir)
    newworker$ cargo package
    
  14. Calm down
    newworker$ cargo publish --dry-run
    
  15. Publish (at new working dir)
    newworker$ cargo publish
    
  16. 🎉
Clone this wiki locally