mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(ci): add op-reth to release workflow (#8132)
This commit is contained in:
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@ -11,8 +11,10 @@ on:
|
||||
env:
|
||||
REPO_NAME: ${{ github.repository_owner }}/reth
|
||||
IMAGE_NAME: ${{ github.repository_owner }}/reth
|
||||
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
|
||||
CARGO_TERM_COLOR: always
|
||||
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth
|
||||
OP_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/op-reth
|
||||
DOCKER_USERNAME: ${{ github.actor }}
|
||||
|
||||
jobs:
|
||||
@ -36,9 +38,15 @@ jobs:
|
||||
run: |
|
||||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
|
||||
docker buildx create --use --name cross-builder
|
||||
- name: Build and push image, tag as "latest"
|
||||
- name: Build and push reth image, tag as "latest"
|
||||
if: ${{ contains(github.event.ref, 'beta') }}
|
||||
run: make PROFILE=maxperf docker-build-push-latest
|
||||
- name: Build and push image
|
||||
- name: Build and push reth image
|
||||
if: ${{ ! contains(github.event.ref, 'beta') }}
|
||||
run: make PROFILE=maxperf docker-build-push
|
||||
- name: Build and push op-reth image, tag as "latest"
|
||||
if: ${{ contains(github.event.ref, 'beta') }}
|
||||
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push-latest
|
||||
- name: Build and push op-reth image
|
||||
if: ${{ ! contains(github.event.ref, 'beta') }}
|
||||
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push
|
||||
|
||||
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -10,6 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
REPO_NAME: ${{ github.repository_owner }}/reth
|
||||
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
|
||||
IMAGE_NAME: ${{ github.repository_owner }}/reth
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
@ -30,6 +31,7 @@ jobs:
|
||||
needs: extract-version
|
||||
strategy:
|
||||
matrix:
|
||||
build: [{command: build, binary: reth}, {command: build-op, binary: op-reth}]
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
@ -63,12 +65,12 @@ jobs:
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-os-version)" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Reth
|
||||
run: make PROFILE=${{ matrix.profile }} build-${{ matrix.target }}
|
||||
run: make PROFILE=${{ matrix.profile }} ${{ matrix.build.command }}-${{ matrix.target }}
|
||||
- name: Move binary
|
||||
run: |
|
||||
mkdir artifacts
|
||||
[[ "${{ matrix.target }}" == *windows* ]] && ext=".exe"
|
||||
mv "target/${{ matrix.target }}/${{ matrix.profile }}/reth${ext}" ./artifacts
|
||||
mv "target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.build.binary }}${ext}" ./artifacts
|
||||
|
||||
- name: Configure GPG and create artifacts
|
||||
env:
|
||||
@ -78,22 +80,22 @@ jobs:
|
||||
export GPG_TTY=$(tty)
|
||||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
|
||||
cd artifacts
|
||||
tar -czf reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz reth*
|
||||
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
tar -czf ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz ${{ matrix.build.binary }}*
|
||||
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
mv *tar.gz* ..
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
name: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
path: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||
|
||||
- name: Upload signature
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||
name: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||
path: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||
|
||||
draft-release:
|
||||
name: draft release
|
||||
@ -184,7 +186,7 @@ jobs:
|
||||
ENDBODY
|
||||
)
|
||||
assets=()
|
||||
for asset in ./reth-*.tar.gz*; do
|
||||
for asset in ./*reth-*.tar.gz*; do
|
||||
assets+=("$asset/$asset")
|
||||
done
|
||||
tag_name="${{ env.VERSION }}"
|
||||
|
||||
Reference in New Issue
Block a user