Skip to content

Build and Release

mitty1293 edited this page May 31, 2024 · 2 revisions

1. Build the Binary File

First, build the binary file using the following command:

cargo build --release

This will generate the binary file in the ./target/release/ directory.

2. Create a Temporary Directory

Create a temporary directory to organize the files before creating the ZIP file. This step ensures that the ZIP file structure is clean and includes all necessary files.

mkdir -p /tmp/obo_release

3. Copy Files to the Temporary Directory

Copy the built binary and the LICENSE file to the temporary directory.

cp target/release/obo /tmp/obo_release/
cp LICENSE /tmp/obo_release/

4. Create the ZIP File

Create a ZIP file with the version number included in the filename.
For example, if the version is v1.0.0, use the following command to create the ZIP file:

cd /tmp/obo_release
zip obo_v1.0.0.zip obo LICENSE

5. Upload to GitHub Releases Page

Upload the release build binary to the GitHub Releases page to make it easy for users to download:

  1. Go to the GitHub repository page.
  2. Click on the Releases section on the right.
  3. Click on Draft a new release.
  4. Enter the version number and release notes.
  5. Drag and drop the obo_v1.0.0.zip file you created into the Attach binaries section.
  6. Click Publish release.