-
Notifications
You must be signed in to change notification settings - Fork 18
docs: add releasing document #91
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d0b43f2
docs: add releasing document
qdm12 8c807c5
Remove release_checklist issue template
qdm12 4d5f8f4
Add .devcontainer updates steps
qdm12 3a2da34
Simplify finding rpc chain vm protocol using test
qdm12 5ef5cd3
Specify release description format
qdm12 3cfc996
Give gh command to merge release branch given git commands won't work
qdm12 58e344f
Give gh command to watch status of hello-world PR
qdm12 dd521e8
Add command to create release using gh
qdm12 a093f90
Push tag then create release
qdm12 e101f5d
Apply PR feedback
qdm12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,3 +86,7 @@ In order to upgrade the Subnet-EVM version, you need to change the version in `g | |
| [v0.2.5] [email protected] (Protocol Version: 38) | ||
| [v0.3.0] [email protected] (Protocol Version: 39) | ||
| ``` | ||
|
|
||
| ## Release Process | ||
|
|
||
| Please refer to the [Releasing document](docs/releasing/README.md) for more information on how to release a new version of Precompile-EVM. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,182 @@ | ||
| # Releasing | ||
|
|
||
| ## When to release | ||
|
|
||
| - When a [Subnet-EVM](https://github.com/ava-labs/avalanchego/releases) release is made | ||
| - If there is a significant code change or bugfix in this repository | ||
|
|
||
| ## Procedure | ||
|
|
||
| In this section, we create a release `v0.4.0`. We therefore assign these environment variables to simplify copying instructions: | ||
|
|
||
| ```bash | ||
| export VERSION=v0.4.0 | ||
| export GITHUB_USER=username | ||
| ``` | ||
|
|
||
| `GITHUB_USER` is the username of the person creating the release. This is simply used to prefix branches. | ||
|
|
||
| 1. Create your branch, usually from the tip of the `main` branch: | ||
|
|
||
| ```bash | ||
| git fetch origin main:main | ||
| git checkout main | ||
| git checkout -b "$GITHUB_USER/releases/$VERSION" | ||
| ``` | ||
|
|
||
| 1. Modify the [plugin/main.go](../../plugin/main.go) `Version` global string constant and set it to the desired `$VERSION`. | ||
| 1. Upgrade the [subnet-evm Go dependency](https://github.com/ava-labs/subnet-evm/releases), which will likely also upgrade the AvalancheGo dependency version: | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| go get github.com/ava-labs/subnet-evm | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| go mod tidy | ||
| ``` | ||
|
|
||
| 1. Get the Go version from the `go.mod` file: | ||
|
|
||
| ```bash | ||
| cat go.mod | grep -oE "^go 1\.\d+" | grep -oE "1\.\d+" | ||
qdm12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| and update the [.devcontainer/devcontainer.json](../../.devcontainer/devcontainer.json) file with the Go version at `.features.["ghcr.io/devcontainers/features/go:1.version"].version`, for example: | ||
|
|
||
| ```json | ||
| { | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/go:1": {"version": 1.23}, | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| 1. Get the AvalancheGo version from the `go.mod` file: | ||
|
|
||
| ```bash | ||
| go list -m all | grep github.com/ava-labs/avalanchego | awk '{print $2}' | ||
qdm12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| and update the [.devcontainer/devcontainer.json](../../.devcontainer/devcontainer.json) file with it at `.build.args.AVALANCHEGO_VERSION`, for example: | ||
|
|
||
| ```json | ||
| { | ||
| "build": { | ||
| "args": { | ||
| "AVALANCHEGO_VERSION": "v1.13.0" | ||
| } | ||
| }, | ||
| } | ||
| ``` | ||
|
|
||
| 1. Add an entry in the object in [compatibility.json](../../compatibility.json), adding the target release `$VERSION` as key and the AvalancheGo RPC chain VM protocol version as value, to the `"rpcChainVMProtocolVersion"` JSON object. For example, we would add: | ||
|
|
||
| ```json | ||
| "v0.4.0": 39, | ||
| ``` | ||
|
|
||
| 💁 If you are unsure about the RPC chain VM protocol version, set the version to `0`, for exampple `"v0.4.0": 0`, and then run: | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| go test -run ^TestCompatibility$ github.com/ava-labs/precompile-evm/plugin | ||
| ``` | ||
|
|
||
| This will fail with an error similar to: | ||
|
|
||
| ```text | ||
| compatibility.json has precompile-evm version v0.4.0 stated as compatible with RPC chain VM protocol version 0 but AvalancheGo protocol version is 39 | ||
| ``` | ||
|
|
||
| This message can help you figure out what the correct RPC chain VM protocol version (here `39`) has to be in compatibility.json for your current release. | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. Specify the AvalancheGo compatibility in the [README.md relevant section](../../README.md#avalanchego-compatibility). For example we would add: | ||
|
|
||
| ```text | ||
| ... | ||
| [v0.4.0] [email protected]/1.13.0-fuji/1.13.0 (Protocol Version: 39) | ||
| ``` | ||
|
|
||
| 1. Commit your changes and push the branch | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -S -m "chore: release $VERSION" | ||
| git push -u origin "$GITHUB_USER/releases/$VERSION" | ||
| ``` | ||
|
|
||
| 1. Create a pull request (PR) from your branch targeting main, for example using [`gh`](https://cli.github.com/): | ||
|
|
||
| ```bash | ||
| gh pr create --repo github.com/ava-labs/precompile-evm --base main --title "chore: release $VERSION" | ||
| ``` | ||
|
|
||
| 1. Wait for the PR checks to pass | ||
| 1. Update the `hello-world-example` branch to be rebased on your release branch: | ||
|
|
||
| ```bash | ||
| git fetch origin hello-world-example:hello-world-example | ||
| git checkout hello-world-example | ||
| git rebase "$GITHUB_USER/releases/$VERSION" | ||
| # Fix eventual conflicts | ||
| git push --force hello-world-example | ||
| ``` | ||
|
|
||
| 1. [Wait for the checks](https://github.com/ava-labs/precompile-evm/pull/12/checks) of the `hello-world-example` branch [PR](https://github.com/ava-labs/precompile-evm/pull/12) to pass. **Never merge this PR**. You can also use `gh` with: | ||
|
|
||
| ```bash | ||
| gh pr checks 12 --watch | ||
| ``` | ||
|
|
||
| 1. Squash and merge your release branch into `main`, for example: | ||
|
|
||
| ```bash | ||
| gh pr merge "$GITHUB_USER/releases/$VERSION" --squash --delete-branch --subject "chore: release $VERSION" --body "\n- Bump subnet-evm from v0.7.3 to v0.7.4\n- Update AvalancheGo from v1.12.3 to v1.13.0" | ||
| ``` | ||
|
|
||
| 1. Create a release branch from the `main` branch, this time without your username prefix: | ||
|
|
||
| ```bash | ||
| git checkout -b "releases/$VERSION" | ||
| ``` | ||
|
|
||
| This is to avoid creating a release targeting the `main` branch, which may contain new commits merged whilst the release is being created. | ||
qdm12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. Create a new release on Github, either using: | ||
| - the [Github web interface](https://github.com/ava-labs/subnet-evm/releases/new) | ||
| 1. In the "Choose a tag" box, enter `$VERSION` (`v0.4.0`) | ||
| 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) | ||
| 1. Pick the previous release, for example as `v0.3.0`. | ||
| 1. Set the "Release title" to `$VERSION` (`v0.4.0`) | ||
| 1. Set the description using this format: | ||
|
|
||
| ```markdown | ||
| # AvalancheGo Compatibility | ||
|
|
||
| The plugin version is unchanged at 39 and is compatible with AvalancheGo version v1.13.0. | ||
|
|
||
| # Breaking changes | ||
|
|
||
| # Features | ||
|
|
||
| # Fixes | ||
|
|
||
| # Documentation | ||
|
|
||
| ``` | ||
|
|
||
| 1. Only tick the box "Set as the latest release" | ||
| 1. Click on the "Create release" button | ||
| - the Github CLI `gh`: | ||
|
|
||
| ```bash | ||
| PREVIOUS_VERSION=v0.3.1 | ||
| NOTES="# AvalancheGo Compatibility | ||
|
|
||
| The plugin version is unchanged at 39 and is compatible with AvalancheGo version v1.13.0. | ||
|
|
||
| # Breaking changes | ||
|
|
||
| # Features | ||
|
|
||
| # Fixes | ||
|
|
||
| # Documentation | ||
|
|
||
| " | ||
| gh release create "$VERSION" --target "releases/$VERSION" --title "$VERSION" --notes-start-tag "$PREVIOUS_VERSION" --notes "$NOTES" | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.