Release 1.1.0

by ADMIN 14 views

Part 1: Bump BDK Rust Version

The first step in preparing for the release of language bindings libraries is to bump the BDK Rust version. This involves updating the Cargo.toml file to the new BDK release candidate and ensuring that all CI workflows run correctly. If any errors occur, they need to be fixed promptly.

Step 1: Open a PR with an update to Cargo.toml

To begin, open a pull request (PR) with an update to the Cargo.toml file to the new BDK release candidate. This will ensure that the library is using the latest version of BDK.

# Update Cargo.toml to the new BDK release candidate
git add Cargo.toml
git commit -m "Update Cargo.toml to BDK release candidate"
git push origin <branch-name>

Step 2: Run CI workflows and fix errors

Once the PR is opened, run the CI workflows to ensure that they are working correctly. If any errors occur, fix them promptly to avoid delays in the release process.

# Run CI workflows
just test

Step 3: Update PR to replace release candidate with full release

Once the new BDK release is out, update the PR to replace the release candidate with the full release and merge it.

# Update PR to replace release candidate with full release
git checkout <branch-name>
git pull origin <branch-name>
git add Cargo.toml
git commit -m "Update Cargo.toml to BDK full release"
git push origin <branch-name>

Part 2: Prepare Libraries for Release Branch

The next step is to prepare the libraries for the release branch. This involves updating the API docs, deleting the target directory, building the library, and running tests.

Step 1: Update API docs

Update the API docs to reflect the changes in the API.

# Update API docs
just docs

Step 2: Delete target directory

Delete the target directory in the bdk-ffi and all build directories (in root, lib, and plugins) in the bdk-android directory to make sure you're building the library from scratch.

# Delete target directory
rm -rf target

Step 3: Build library and run tests

Build the library and run the offline and live tests, and adjust them if necessary.

# Build library and run tests
just clean
just build
just test

Step 4: Update readme

Update the readme if necessary.

# Update readme
git add README.md
git commit -m "Update README.md"
git push origin <branch-name>

Part 3: Release Workflow

The final step is to create a new branch off of master called release/<feature version>, update the bdk-android, bdk-jvm, and bdk-python versions, and create a tag for the release.

Step 1: Create new branch

Create a new branch off of master called release/<feature version>.

# Create new branch
git checkout -b release/<feature-version>

Step 2: Update bdk-android version

Update the bdk-android version from SNAPSHOT version to release version.

# Update bdk-android version
git checkout <branch-name>
git pull origin <branch-name>
git add bdk-android/Cargo.toml
git commit -m "Update bdk-android version"
git push origin <branch-name>

Step 3: Update bdk-jvm version

Update the bdk-jvm version from SNAPSHOT version to release version.

# Update bdk-jvm version
git checkout <branch-name>
git pull origin <branch-name>
git add bdk-jvm/Cargo.toml
git commit -m "Update bdk-jvm version"
git push origin <branch-name>

Step 4: Update bdk-python version

Update the bdk-python version from .dev version to release version.

# Update bdk-python version
git checkout <branch-name>
git pull origin <branch-name>
git add bdk-python/setup.py
git commit -m "Update bdk-python version"
git push origin <branch-name>

Step 5: Create tag for release

Create a tag for the release and make sure to add the changelog info to the tag.

# Create tag for release
git tag v<version> --sign --edit
git push upstream v<version>

Step 6: Trigger manual releases

Trigger manual releases for all 4 libraries.

# Trigger manual releases
just release

Step 7: Verify released libraries

Verify that the released libraries work and contain the artifacts you would expect.

# Verify released libraries
just test

Step 8: Aggregate changelog notices

Aggregate all the changelog notices from the PRs and add them to the changelog file.

# Aggregate changelog notices
git log --format=%s > changelog.md

Step 9: Bump versions on master

Bump the versions on master from 0.9.0-SNAPSHOT to 0.10.0-SNAPSHOT, 0.6.0.dev0 to 0.7.0.dev0.

# Bump versions on master
git checkout master
git pull origin master
git add Cargo.toml
git commit -m "Bump versions on master"
git push origin master

Step 10: Apply changes to release issue template

Apply changes to the release issue template if needed.

# Apply changes to release issue template
git checkout master
git pull origin master
git add .github/ISSUE_TEMPLATE/release.yml
git commit -m "Apply changes to release issue template"
git push origin master

Step 11: Make release on GitHub

Make a release on GitHub and set it as a pre-release.

# Make release on GitHub
just release

Step 12: Post in announcement channel

Post in the announcement channel to notify users of the new release.

# Post in announcement channel
just announce

Step 13: Tweet about library

Tweet about the library to notify users of the new release.

# Tweet about library
just tweet
```<br/>
**Release 1.1.0: A Comprehensive Guide to Preparing and Releasing Language Bindings Libraries - Q&A**
====================================================================================

**Q: What is the purpose of bumping the BDK Rust version?**
---------------------------------------------------

A: The purpose of bumping the BDK Rust version is to ensure that the library is using the latest version of BDK. This is necessary to take advantage of new features and bug fixes in BDK.

**Q: How do I update the API docs?**
-----------------------------------

A: To update the API docs, you need to run the `just docs` command. This will generate the API documentation based on the current state of the code.

**Q: Why do I need to delete the `target` directory?**
------------------------------------------------

A: You need to delete the `target` directory to ensure that you're building the library from scratch. This is necessary to avoid any potential issues with cached build artifacts.

**Q: How do I build the library and run tests?**
------------------------------------------------

A: To build the library and run tests, you need to run the `just clean`, `just build`, and `just test` commands in sequence. This will clean the build directory, build the library, and run the tests.

**Q: What is the purpose of creating a new branch for the release?**
---------------------------------------------------------

A: The purpose of creating a new branch for the release is to isolate the changes made for the release from the main codebase. This makes it easier to manage the release process and avoid any potential issues with the main codebase.

**Q: How do I update the bdk-android, bdk-jvm, and bdk-python versions?**
-------------------------------------------------------------------

A: To update the bdk-android, bdk-jvm, and bdk-python versions, you need to update the `Cargo.toml` and `setup.py` files respectively. You also need to run the `just clean`, `just build`, and `just test` commands to ensure that the updated versions are working correctly.

**Q: What is the purpose of creating a tag for the release?**
---------------------------------------------------

A: The purpose of creating a tag for the release is to mark the release as a specific version of the library. This makes it easier to track the release history and ensure that users are using the correct version of the library.

**Q: How do I trigger manual releases for all 4 libraries?**
---------------------------------------------------------

A: To trigger manual releases for all 4 libraries, you need to run the `just release` command. This will trigger the release process for all 4 libraries.

**Q: What is the purpose of verifying the released libraries?**
---------------------------------------------------------

A: The purpose of verifying the released libraries is to ensure that they are working correctly and contain the expected artifacts. This makes it easier to identify any potential issues with the release process.

**Q: How do I aggregate the changelog notices?**
------------------------------------------------

A: To aggregate the changelog notices, you need to run the `git log --format=%s > changelog.md` command. This will generate a changelog file based on the commit history.

**Q: What is the purpose of bumping the versions on master?**
---------------------------------------------------------

A: The purpose of bumping the versions on master is to update the versions of the library on the main codebase. This makes it easier to track the release history and ensure that users are using the correct version of the library.

**Q: How do I apply changes to the release issue template?**
---------------------------------------------------------

A: To apply changes to the release issue template, you need to update the `.github/ISSUE_TEMPLATE/release.yml` file and commit the changes. This will update the release issue template to reflect the changes made for the release.

**Q: What is the purpose of making a release on GitHub?**
---------------------------------------------------

A: The purpose of making a release on GitHub is to mark the release as a specific version of the library and make it available to users. This makes it easier to track the release history and ensure that users are using the correct version of the library.

**Q: How do I post in the announcement channel?**
------------------------------------------------

A: To post in the announcement channel, you need to run the `just announce` command. This will send a notification to the announcement channel to notify users of the new release.

**Q: What is the purpose of tweeting about the library?**
---------------------------------------------------

A: The purpose of tweeting about the library is to notify users of the new release and make them aware of the changes made to the library. This makes it easier to track the release history and ensure that users are using the correct version of the library.