diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0837b717a9..b82d6ed60f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,7 +4,6 @@ on:
push:
branches:
- "main"
- - "fix-ci" # TODO: remove fix-ci after testing.
tags:
- "v1.*"
@@ -47,23 +46,10 @@ jobs:
- name: Upload artifacts (amd64)
uses: actions/upload-artifact@v4
with:
- name: linux-amd64-archives
- path: "*.tar.gz*"
- - name: Cleanup bin
- run: rm -f build/bin/*
-
- - name: Build (386)
- run: |
- go run build/ci.go install -arch 386 -dlgo
-
- - name: Create archive (386)
- run: |
- go run build/ci.go archive -arch 386 -type tar
- - name: Upload artifacts (386)
- uses: actions/upload-artifact@v4
- with:
- name: linux-386-archives
- path: "*.tar.gz*"
+ name: geth-linux-amd64-archives
+ path: |
+ geth-linux-amd64-*.tar.gz
+ geth-alltools-linux-amd64-*.tar.gz
- name: Cleanup bin
run: rm -f build/bin/*
@@ -96,64 +82,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: linux-arm64-archives
- path: "*arm64*.tar.gz*"
- - name: Cleanup bin
- run: rm -fr build/bin/*
-
- - name: Run build (arm5)
- run: |
- go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- env:
- GOARM: "5"
-
- - name: Create archive (arm5)
- run: |
- go run build/ci.go archive -arch arm -type tar
- env:
- GOARM: "5"
- - name: Upload artifacts (arm5)
- uses: actions/upload-artifact@v4
- with:
- name: linux-arm5-archives
- path: "*arm*5*.tar.gz*"
- - name: Cleanup bin
- run: rm -fr build/bin/*
-
- - name: Run build (arm6)
- run: |
- go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- env:
- GOARM: "6"
-
- - name: Create archive (arm6)
- run: |
- go run build/ci.go archive -arch arm -type tar
- env:
- GOARM: "6"
- - name: Upload artifacts (arm6)
- uses: actions/upload-artifact@v4
- with:
- name: linux-arm6-archives
- path: "*arm*6*.tar.gz*"
- - name: Cleanup bin
- run: rm -fr build/bin/*
-
- - name: Run build (arm7)
- run: |
- go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- env:
- GOARM: "7"
-
- - name: Create archive (arm7)
- run: |
- go run build/ci.go archive -arch arm -type tar
- env:
- GOARM: "7"
- - name: Upload artifacts (arm7)
- uses: actions/upload-artifact@v4
- with:
- name: linux-arm7-archives
- path: "*arm*7*.tar.gz*"
+ path: |
+ geth-linux-arm64-*.tar.gz
+ geth-alltools-linux-arm64-*.tar.gz
- name: Cleanup bin
run: rm -fr build/bin/*
@@ -191,7 +122,7 @@ jobs:
run: |
go run build/ci.go dockerx -platform linux/amd64,linux/arm64 -hub ghcr.io/berachain/bera-geth -upload
- release:
+ draft-release:
name: Draft Release
needs: [extract-version, linux-intel, linux-arm]
runs-on: ubuntu-latest
@@ -222,9 +153,25 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Move all artifacts to current directory
- find ./artifacts -name "*.tar.gz*" -exec mv {} . \;
+ find ./artifacts -name "*.tar.gz" -exec mv {} . \;
- body=$(cat <<- "ENDBODY"
+ # List available files for debugging
+ echo "Available files:"
+ ls -la *.tar.gz || echo "No tar.gz files found"
+
+ # Get actual archive names
+ GETH_AMD64=$(ls geth-linux-amd64-*.tar.gz | grep -v alltools | head -1)
+ GETH_ARM64=$(ls geth-linux-arm64-*.tar.gz | grep -v alltools | head -1)
+ GETH_ALLTOOLS_AMD64=$(ls geth-alltools-linux-amd64-*.tar.gz | head -1)
+ GETH_ALLTOOLS_ARM64=$(ls geth-alltools-linux-arm64-*.tar.gz | head -1)
+
+ echo "Found archives:"
+ echo " AMD64: $GETH_AMD64"
+ echo " ARM64: $GETH_ARM64"
+ echo " Alltools AMD64: $GETH_ALLTOOLS_AMD64"
+ echo " Alltools ARM64: $GETH_ALLTOOLS_ARM64"
+
+ body=$(cat <<- 'ENDBODY'

## Summary
@@ -252,24 +199,20 @@ jobs:
| System | Architecture | Binary | Notes |
|:---:|:---:|:---:|:---|
- |
| amd64 | [geth-linux-amd64-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-amd64-${{ env.VERSION }}.tar.gz) | Most Linux systems |
- |
| 386 | [geth-linux-386-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-386-${{ env.VERSION }}.tar.gz) | Older Linux systems |
- |
| arm64 | [geth-linux-arm64-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-arm64-${{ env.VERSION }}.tar.gz) | 64-bit ARM systems |
- |
| armv5 | [geth-linux-arm-5-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-arm-5-${{ env.VERSION }}.tar.gz) | ARMv5 systems |
- |
| armv6 | [geth-linux-arm-6-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-arm-6-${{ env.VERSION }}.tar.gz) | ARMv6 systems (Raspberry Pi Zero) |
- |
| armv7 | [geth-linux-arm-7-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-linux-arm-7-${{ env.VERSION }}.tar.gz) | ARMv7 systems (Raspberry Pi 2+) |
- |
| - | [geth-alltools-linux-amd64-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-alltools-linux-amd64-${{ env.VERSION }}.tar.gz) | All tools bundle (amd64) |
- |
| - | [geth-alltools-linux-arm64-${{ env.VERSION }}.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/geth-alltools-linux-arm64-${{ env.VERSION }}.tar.gz) | All tools bundle (arm64) |
+ |
| amd64 | [GETH_AMD64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_AMD64_PLACEHOLDER) | Most Linux systems |
+ |
| arm64 | [GETH_ARM64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ARM64_PLACEHOLDER) | 64-bit ARM systems |
+ |
| - | [GETH_ALLTOOLS_AMD64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ALLTOOLS_AMD64_PLACEHOLDER) | All tools bundle (amd64) |
+ |
| - | [GETH_ALLTOOLS_ARM64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ALLTOOLS_ARM64_PLACEHOLDER) | All tools bundle (arm64) |
| **System** | **Option** | - | **Resource** |
|
| Docker | | [ghcr.io/berachain/bera-geth](https://ghcr.io/berachain/bera-geth) |
### Installation
The archives contain the geth binary and license file. Extract and run:
- \`\`\`bash
- tar -xzf geth-linux-amd64-${{ env.VERSION }}.tar.gz
+ ```bash
+ tar -xzf GETH_AMD64_PLACEHOLDER
./geth
- \`\`\`
+ ```
The **alltools** archives additionally contain:
- `abigen` - Source code generator for Ethereum contracts
@@ -280,5 +223,19 @@ jobs:
ENDBODY
)
+ # Replace placeholders with actual filenames
+ body="${body//GETH_AMD64_PLACEHOLDER/$GETH_AMD64}"
+ body="${body//GETH_ARM64_PLACEHOLDER/$GETH_ARM64}"
+ body="${body//GETH_ALLTOOLS_AMD64_PLACEHOLDER/$GETH_ALLTOOLS_AMD64}"
+ body="${body//GETH_ALLTOOLS_ARM64_PLACEHOLDER/$GETH_ALLTOOLS_ARM64}"
+
+ # Create assets array for gh release
+ assets=()
+ for asset in geth-*.tar.gz; do
+ if [ -f "$asset" ]; then
+ assets+=("$asset")
+ fi
+ done
+
tag_name="${{ env.VERSION }}"
- echo "$body" | gh release create --draft -t "Geth $tag_name" -F "-" "$tag_name" *.tar.gz
+ echo "$body" | gh release create --draft -t "Bera Geth $tag_name" -F "-" "$tag_name" "${assets[@]}"
diff --git a/build/ci.go b/build/ci.go
index 9d83c2c51d..d5806277b4 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -572,9 +572,9 @@ func doArchive(cmdline []string) {
var (
env = build.Env()
- basegeth = archiveBasename(*arch, version.Archive(env.Commit))
- geth = "geth-" + basegeth + ext
- alltools = "geth-alltools-" + basegeth + ext
+ basegeth = archiveBasename(*arch, version.Archive(env.Tag, env.Commit))
+ geth = "bera-geth-" + basegeth + ext
+ alltools = "bera-geth-alltools-" + basegeth + ext
)
maybeSkipArchive(env)
if err := build.WriteArchive(geth, gethArchiveFiles); err != nil {
@@ -650,8 +650,7 @@ func maybeSkipArchive(env build.Environment) {
log.Printf("skipping archive creation because this is a PR build")
os.Exit(0)
}
- // TODO: remove fix-ci after testing.
- if env.Branch != "main" && env.Branch != "fix-ci" && !strings.HasPrefix(env.Tag, "v1.") {
+ if env.Branch != "main" && !strings.HasPrefix(env.Tag, "v1.") {
log.Printf("skipping archive creation because branch %q, tag %q is not on the inclusion list", env.Branch, env.Tag)
os.Exit(0)
}
@@ -1094,7 +1093,7 @@ func doWindowsInstaller(cmdline []string) {
if env.Commit != "" {
ver[2] += "-" + env.Commit[:8]
}
- installer, err := filepath.Abs("geth-" + archiveBasename(*arch, version.Archive(env.Commit)) + ".exe")
+ installer, err := filepath.Abs("geth-" + archiveBasename(*arch, version.Archive(env.Tag, env.Commit)) + ".exe")
if err != nil {
log.Fatalf("Failed to convert installer file path: %v", err)
}
diff --git a/internal/version/version.go b/internal/version/version.go
index a667827273..90d1410cd5 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -57,8 +57,8 @@ func WithCommit(gitCommit, gitDate string) string {
// Archive holds the textual version string used for Geth archives. e.g.
// "1.8.11-dea1ce05" for stable releases, or "1.8.13-unstable-21c059b6" for unstable
// releases.
-func Archive(gitCommit string) string {
- vsn := Semantic
+func Archive(tag, gitCommit string) string {
+ vsn := tag
if version.Meta != "stable" {
vsn += "-" + version.Meta
}