Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.4.1 #446

Closed
32 tasks done
lucab opened this issue Jun 29, 2020 · 3 comments
Closed
32 tasks done

Release 4.4.1 #446

lucab opened this issue Jun 29, 2020 · 3 comments

Comments

@lucab
Copy link
Contributor

lucab commented Jun 29, 2020

Release process

This project uses cargo-release in order to prepare new releases, tag and sign relevant git commit, and publish the resulting artifacts to crates.io.
The release process follows the usual PR-and-review flow, allowing an external reviewer to have a final check before publishing.

In order to ease downstream packaging of Rust binaries, an archive of vendored dependencies is also provided (only relevant for offline builds).

Requirements

This guide requires:

  • a web browser (and network connectivity)
  • git
  • GPG setup and personal key for signing
  • cargo (suggested: latest stable toolchain from rustup)
  • cargo-release (suggested: cargo install -f cargo-release)
  • A verified account on crates.io
  • Write access to this GitHub project
  • Upload access to this project on GitHub and crates.io

Release checklist

These steps show how to release version x.y.z on the origin remote (this can be checked via git remote -av).
Push access to the upstream repository is required in order to publish the new tag and the PR branch.

  • make sure the project is clean and prepare the environment:
    • cargo test
    • cargo clean
    • git clean -fd
    • export RELEASE_VER=x.y.z
    • export UPSTREAM_REMOTE=origin

⚠️: UPSTREAM_REMOTE should reference the locally configured remote that points to the upstream git repository.

  • create release commits on a dedicated branch and tag it:

    • git checkout -b release-${RELEASE_VER}
    • cargo release (and confirm the version when prompted)
  • open a PR for this release:

    • git push ${UPSTREAM_REMOTE} release-${RELEASE_VER}
    • open a web browser and create a PR for the branch above
    • make sure the resulting PR contains exactly two commits
    • in the PR body, write a short changelog with relevant changes since last release
  • get the PR reviewed, approved and merged

  • publish the artifacts (tag and crate):

    • git push ${UPSTREAM_REMOTE} v${RELEASE_VER}
    • make sure the upstream tag matches the local tag: git fetch --tags --verbose ${UPSTREAM_REMOTE} 2>&1 | grep ${RELEASE_VER}
    • git checkout v${RELEASE_VER}
    • make sure the tag is what you intend to release; if so this will show an empty output: git diff release-${RELEASE_VER}~1 v${RELEASE_VER}
    • cargo publish
  • assemble vendor archive:

    • cargo vendor
    • tar -czf target/afterburn-${RELEASE_VER}-vendor.tar.gz vendor
  • publish this release on GitHub:

    • open a web browser and create a GitHub Release for the tag above
    • write a short changelog (i.e. re-use the PR content)
    • upload target/afterburn-${RELEASE_VER}-vendor.tar.gz
    • record digests of local artifacts:
      • sha256sum target/package/afterburn-${RELEASE_VER}.crate
      • sha256sum target/afterburn-${RELEASE_VER}-vendor.tar.gz
    • publish release
  • clean up:

    • cargo clean
    • rm -rf vendor
    • git checkout master
    • git pull ${UPSTREAM_REMOTE} master
    • git push ${UPSTREAM_REMOTE} :release-${RELEASE_VER}
    • git branch -d release-${RELEASE_VER}
    • unset RELEASE_VER
    • unset UPSTREAM_REMOTE
@lucab
Copy link
Contributor Author

lucab commented Jun 29, 2020

Waiting for #444 to merge before tagging this.

@lucab
Copy link
Contributor Author

lucab commented Jun 30, 2020

PR at #448

@lucab
Copy link
Contributor Author

lucab commented Jun 30, 2020

@lucab lucab closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant