Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions README-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,32 @@ To create and publish a new release of the crate to crates.io:

## 1. Update the Version

- Update the version in `jup-ag-sdk/Cargo.toml` following [semantic versioning](https://semver.org/), e.g., `0.1.5` → `0.2.0` for a minor update.
- Update the version in `jup-ag-sdk/Cargo.toml` following [semantic versioning](https://semver.org/), e.g., `1.0.2` → `1.0.3` for a patch update.

## 2. Commit the Changes
## 2. Create a Pull Request

- Commit and push the version update to the main branch:
- Create a branch for the version update:
```sh
git checkout -b bump-version-x.y.z
git add jup-ag-sdk/Cargo.toml
git commit -m "Bump version to vX.Y.Z"
git push origin main
git push origin bump-version-x.y.z
```
- Create a pull request to merge these changes into the main branch
- Get the PR reviewed and approved
- Once merged, the auto-tag workflow will run automatically

## 3. Create a Tag
## 3. Automatic Tag Creation

- Tag the commit with the new version:
```sh
git tag vX.Y.Z
git push origin vX.Y.Z
```

Replace `vX.Y.Z` with the actual version number (e.g., `v0.2.0`).
- The GitHub Actions workflow will automatically create a tag matching the version in Cargo.toml when the PR is merged
- You can check the status of the auto-tag workflow in the [Actions tab](https://github.com/Jupiter-DevRel/jup-rust-sdk/actions/workflows/auto-tag.yml)

## 4. GitHub Actions Workflow
## 4. Run the Publish Workflow

- When the tag is pushed, the `publish.yml` GitHub Actions workflow will automatically:
- Go to the [Publish Workflow page](https://github.com/Jupiter-DevRel/jup-rust-sdk/actions/workflows/publish.yml)
- Click on "Run workflow" button (dropdown on the right side)
- Select the branch (usually "main") and click "Run workflow"
- The workflow will:
- Verify that the version in the tag matches the version in Cargo.toml
- Build the package using Cargo
- Publish the crate to crates.io
Expand Down