Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 14 additions & 3 deletions .github/workflows/tag_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,18 @@ jobs:
uses: actions/checkout@v4

- name: Format name
run: echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV
run: |
echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV

- name: Select tags
run: |
if [ "$(echo ${{ github.ref_name }}- | cut -d- -f2 | grep '^rc')" == "" ]; then
echo "L1_TAGS=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}" >> $GITHUB_ENV
echo "L2_TAGS=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:l2,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}-l2" >> $GITHUB_ENV
else
echo "L1_TAGS=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}" >> $GITHUB_ENV
echo "L2_TAGS=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}-l2" >> $GITHUB_ENV
fi

# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push L1 Docker image
Expand All @@ -206,7 +217,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}
tags: ${{ env.L1_TAGS }}

# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push L2 Docker image
Expand All @@ -217,7 +228,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-l2,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}-l2
tags: ${{ env.L2_TAGS }}
build_args: BUILD_FLAGS=--features l2,l2-sql

# Creates a release on GitHub with the binaries
Expand Down
33 changes: 21 additions & 12 deletions docs/developers/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,51 +52,60 @@ After pushing the tag, a CI job will compile the binaries for different architec
| ethrex-l2-linux-aarch64-gpu | ✅ | SP1 - Exec | ✅ |
| ethrex-l2-macos-aarch64 | ✅ | Exec | ❌ |

A changelog will be generated based on commit names (using conventional commits) from the last tag.
Also, two docker images are built and pushed to the Github Container registry:
- `ghcr.io/lambdaclass/ethrex:latest`
- `ghcr.io/lambdaclass/ethrex:X.Y.Z[-custom]`
- `ghcr.io/lambdaclass/ethrex:l2`
- `ghcr.io/lambdaclass/ethrex:X.Y.Z[-custom]-l2`

A changelog will be generated based on commit names (using conventional commits) from the last tag.

> [!NOTE]
> If the tag has format `vX.Y.Z-rc*`, the release will be a pre-release and in draft mode. Also, `latest` and `l2` docker tags will not be updated.

## 4th - Update Homebrew

Disclaimer: We should automate this

1. Commit a change in https://github.com/lambdaclass/homebrew-tap/ bumping the ethrex version (like this one https://github.com/lambdaclass/homebrew-tap/commit/d78a2772ad9c5412e7f84c6210bd85c970fcd0e6).
- The first SHA is the hash of the `.tar.gz` from the release. You can get it by downloading the `Source code (tar.gz)` from the ethrex release and running

```bash
shasum -a 256 ethrex-v3.0.0.tar.gz
```

- For the second one:
- First download the `ethrex-macos_aarch64` binary from the ethrex release
- Give exec permissions to binary

```bash
chmod +x ethrex-macos_aarch64
```

- Create a dir `ethrex/3.0.0/bin` (replace the version as needed)
- Move (and rename) the binary to `ethrex/3.0.0/bin/ethrex` (the last `ethrex` is the binary)
- Remove quarantine flags (in this case, `ethrex` is the root dir mentioned before):

```bash
xattr -dr com.apple.metadata:kMDItemWhereFroms ethrex
xattr -dr com.apple.quarantine ethrex
```

- Tar the dir with the following name (again, `ethrex` is the root dir):

```bash
tar -czf ethrex-3.0.0.arm64_sonoma.bottle.tar.gz ethrex
```

- Get the checksum:

```bash
shasum -a 256 ethrex-3.0.0.arm64_sonoma.bottle.tar.gz
```

- Use this as the second hash (the one in the `bottle` section)
2. Push the commit
3. Create a new release with tag `v3.0.0`
3. Create a new release with tag `v3.0.0`
IMPORTANT: attach the `ethrex-3.0.0.arm64_sonoma.bottle.tar.gz` to the release

## 5th - Merge the release branch via PR
Expand Down