Skip to content

Commit 27fdebf

Browse files
committed
Update tag release action
1 parent 5d86b56 commit 27fdebf

File tree

1 file changed

+67
-12
lines changed

1 file changed

+67
-12
lines changed

.github/workflows/release.yml

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,82 @@ env:
1616
DOCKER_USERNAME: ${{ github.actor }}
1717

1818
jobs:
19-
build:
20-
name: build and push
21-
runs-on: ubuntu-20.04
22-
permissions:
23-
packages: write
24-
contents: read
19+
build-x86:
20+
name: Build x86 binary
21+
runs-on: ubuntu-24.04
2522
steps:
2623
- uses: actions/checkout@v4
2724
- uses: dtolnay/rust-toolchain@stable
2825
- uses: Swatinem/rust-cache@v2
2926
with:
3027
cache-on-failure: true
3128
- uses: taiki-e/install-action@cross
32-
- name: Log in to Docker
29+
- name: Set up Docker builder
3330
run: |
34-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
31+
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
32+
docker buildx create --use --name cross-builder
33+
- name: Build
34+
run: make PROFILE=maxperf build-native-x86_64-unknown-linux-gnu
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: fraxtal-op-reth-x86
39+
path: target/x86_64-unknown-linux-gnu/maxperf/fraxtal-op-reth
40+
retention-days: 1
41+
build-arm:
42+
name: Build arm binary
43+
runs-on: ubuntu-24.04-arm
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: dtolnay/rust-toolchain@stable
47+
- uses: Swatinem/rust-cache@v2
48+
with:
49+
cache-on-failure: true
50+
- uses: taiki-e/install-action@cross
3551
- name: Set up Docker builder
3652
run: |
3753
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
3854
docker buildx create --use --name cross-builder
39-
- name: Build and push fraxtal-op-reth image, tag as "latest"
40-
run: make PROFILE=maxperf docker-build-push-latest
41-
- name: Build and push fraxtal-op-reth image
42-
run: make PROFILE=maxperf docker-build-push
55+
- name: Build
56+
run: make PROFILE=maxperf build-native-aarch64-unknown-linux-gnu
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: fraxtal-op-reth-arm
61+
path: target/aarch64-unknown-linux-gnu/maxperf/fraxtal-op-reth
62+
retention-days: 1
63+
64+
build-docker:
65+
name: build and push docker image
66+
needs: [build-x86, build-arm]
67+
runs-on: ubuntu-24.04
68+
permissions:
69+
packages: write
70+
contents: read
71+
steps:
72+
- uses: actions/checkout@v4
73+
- name: Log in to Docker
74+
run: |
75+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
76+
- name: Create artifacts dirs
77+
run: mkdir -p dist/bin/{amd64,arm64}
78+
- name: Download x86 artifact
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: fraxtal-op-reth-x86
82+
path: dist/bin/amd64/fraxtal-op-reth
83+
- name: Download arm artifact
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: fraxtal-op-reth-arm
87+
path: dist/bin/arm64/fraxtal-op-reth
88+
- name: Set up Docker builder
89+
run: docker buildx create --use --name fraxtal
90+
- name: Build and push fraxtal-op-reth nightly image
91+
run: |
92+
docker buildx build --file ./Dockerfile.cross . \
93+
--platform linux/amd64,linux/arm64 \
94+
--tag ghcr.io/fraxfinance/fraxtal-op-reth:${{ github.ref_name }} \
95+
--tag ghcr.io/fraxfinance/fraxtal-op-reth:latest \
96+
--provenance=false \
97+
--push

0 commit comments

Comments
 (0)