-
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 all 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,187 @@ | ||
| # 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`, upgrading the subnet-evm Go dependency to `v0.7.4` and the AvalancheGo version to the one used by subnet-evm, `v1.13.0`. | ||
|
|
||
| We therefore assign these environment variables to simplify copying instructions: | ||
|
|
||
| ```bash | ||
| export VERSION=v0.4.0 | ||
| export SUBNET_EVM_VERSION=v0.7.4 | ||
| ``` | ||
|
|
||
| 1. Create your branch, usually from the tip of the `main` branch: | ||
|
|
||
| ```bash | ||
| git fetch origin main:main | ||
| git checkout main | ||
| git checkout -b "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), for example to version `v0.7.4`: | ||
|
|
||
| ```bash | ||
| go get "github.com/ava-labs/subnet-evm@$SUBNET_EVM_VERSION" | ||
| go mod tidy | ||
| ``` | ||
|
|
||
| This will also upgrade the AvalancheGo version to the one used by subnet-evm. | ||
| 1. Get the Go version from the `go.mod` file: | ||
|
|
||
| ```bash | ||
| cat go.mod | grep -oE "^go 1\.\d+" | grep -oE "1\.\d+" | ||
| ``` | ||
|
|
||
| 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 example `"v0.4.0": 0`, and then run: | ||
|
|
||
| ```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. Alternatively, you can refer to the [Avalanchego repository `version/compatibility.json` file](https://github.com/ava-labs/avalanchego/blob/main/version/compatibility.json) to find the RPC chain VM protocol version matching the AvalancheGo version we use here. | ||
| 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 "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 "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 "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 and push a tag from the `main` branch: | ||
|
|
||
| ```bash | ||
| git fetch origin main:main | ||
| git checkout main | ||
| # Double check the tip of the main branch is the expected commit | ||
| # of the squashed release branch | ||
| git log -1 | ||
| git tag -s "$VERSION" | ||
| git push origin "$VERSION" | ||
| ``` | ||
|
|
||
| 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, select the tag previously created `$VERSION` (`v0.4.0`) | ||
| 1. Pick the previous tag, for example as `v0.3.1`. | ||
| 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" --notes-start-tag "$PREVIOUS_VERSION" --notes-from-tag "$VERSION" --title "$VERSION" --notes "$NOTES" --verify-tag | ||
| ``` | ||
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.