mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
chore(ci): release workflow patches (#15)
* chore(ci): release workflow patches * Reelase fixes
This commit is contained in:
parent
61c4c97cba
commit
d80965096e
3 changed files with 55 additions and 99 deletions
139
.github/workflows/release.yml
vendored
139
.github/workflows/release.yml
vendored
|
|
@ -4,7 +4,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
- "fix-ci" # TODO: remove fix-ci after testing.
|
|
||||||
tags:
|
tags:
|
||||||
- "v1.*"
|
- "v1.*"
|
||||||
|
|
||||||
|
|
@ -47,23 +46,10 @@ jobs:
|
||||||
- name: Upload artifacts (amd64)
|
- name: Upload artifacts (amd64)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-amd64-archives
|
name: geth-linux-amd64-archives
|
||||||
path: "*.tar.gz*"
|
path: |
|
||||||
- name: Cleanup bin
|
geth-linux-amd64-*.tar.gz
|
||||||
run: rm -f build/bin/*
|
geth-alltools-linux-amd64-*.tar.gz
|
||||||
|
|
||||||
- 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: Cleanup bin
|
- name: Cleanup bin
|
||||||
run: rm -f build/bin/*
|
run: rm -f build/bin/*
|
||||||
|
|
||||||
|
|
@ -96,64 +82,9 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-arm64-archives
|
name: linux-arm64-archives
|
||||||
path: "*arm64*.tar.gz*"
|
path: |
|
||||||
- name: Cleanup bin
|
geth-linux-arm64-*.tar.gz
|
||||||
run: rm -fr build/bin/*
|
geth-alltools-linux-arm64-*.tar.gz
|
||||||
|
|
||||||
- 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*"
|
|
||||||
- name: Cleanup bin
|
- name: Cleanup bin
|
||||||
run: rm -fr build/bin/*
|
run: rm -fr build/bin/*
|
||||||
|
|
||||||
|
|
@ -191,7 +122,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
go run build/ci.go dockerx -platform linux/amd64,linux/arm64 -hub ghcr.io/berachain/bera-geth -upload
|
go run build/ci.go dockerx -platform linux/amd64,linux/arm64 -hub ghcr.io/berachain/bera-geth -upload
|
||||||
|
|
||||||
release:
|
draft-release:
|
||||||
name: Draft Release
|
name: Draft Release
|
||||||
needs: [extract-version, linux-intel, linux-arm]
|
needs: [extract-version, linux-intel, linux-arm]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -222,9 +153,25 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Move all artifacts to current directory
|
# 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
|
## Summary
|
||||||
|
|
@ -252,24 +199,20 @@ jobs:
|
||||||
|
|
||||||
| System | Architecture | Binary | Notes |
|
| System | Architecture | Binary | Notes |
|
||||||
|:---:|:---:|:---:|:---|
|
|:---:|:---:|:---:|:---|
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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 |
|
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | amd64 | [GETH_AMD64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_AMD64_PLACEHOLDER) | Most Linux systems |
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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 |
|
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | arm64 | [GETH_ARM64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ARM64_PLACEHOLDER) | 64-bit ARM systems |
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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 |
|
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | - | [GETH_ALLTOOLS_AMD64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ALLTOOLS_AMD64_PLACEHOLDER) | All tools bundle (amd64) |
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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 |
|
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | - | [GETH_ALLTOOLS_ARM64_PLACEHOLDER](https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/GETH_ALLTOOLS_ARM64_PLACEHOLDER) | All tools bundle (arm64) |
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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) |
|
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | 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+) |
|
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | - | [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) |
|
|
||||||
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | - | [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) |
|
|
||||||
| **System** | **Option** | - | **Resource** |
|
| **System** | **Option** | - | **Resource** |
|
||||||
| <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | Docker | | [ghcr.io/berachain/bera-geth](https://ghcr.io/berachain/bera-geth) |
|
| <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | Docker | | [ghcr.io/berachain/bera-geth](https://ghcr.io/berachain/bera-geth) |
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
The archives contain the geth binary and license file. Extract and run:
|
The archives contain the geth binary and license file. Extract and run:
|
||||||
\`\`\`bash
|
```bash
|
||||||
tar -xzf geth-linux-amd64-${{ env.VERSION }}.tar.gz
|
tar -xzf GETH_AMD64_PLACEHOLDER
|
||||||
./geth
|
./geth
|
||||||
\`\`\`
|
```
|
||||||
|
|
||||||
The **alltools** archives additionally contain:
|
The **alltools** archives additionally contain:
|
||||||
- `abigen` - Source code generator for Ethereum contracts
|
- `abigen` - Source code generator for Ethereum contracts
|
||||||
|
|
@ -280,5 +223,19 @@ jobs:
|
||||||
ENDBODY
|
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 }}"
|
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[@]}"
|
||||||
|
|
|
||||||
11
build/ci.go
11
build/ci.go
|
|
@ -572,9 +572,9 @@ func doArchive(cmdline []string) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
env = build.Env()
|
env = build.Env()
|
||||||
basegeth = archiveBasename(*arch, version.Archive(env.Commit))
|
basegeth = archiveBasename(*arch, version.Archive(env.Tag, env.Commit))
|
||||||
geth = "geth-" + basegeth + ext
|
geth = "bera-geth-" + basegeth + ext
|
||||||
alltools = "geth-alltools-" + basegeth + ext
|
alltools = "bera-geth-alltools-" + basegeth + ext
|
||||||
)
|
)
|
||||||
maybeSkipArchive(env)
|
maybeSkipArchive(env)
|
||||||
if err := build.WriteArchive(geth, gethArchiveFiles); err != nil {
|
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")
|
log.Printf("skipping archive creation because this is a PR build")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
// TODO: remove fix-ci after testing.
|
if env.Branch != "main" && !strings.HasPrefix(env.Tag, "v1.") {
|
||||||
if env.Branch != "main" && env.Branch != "fix-ci" && !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)
|
log.Printf("skipping archive creation because branch %q, tag %q is not on the inclusion list", env.Branch, env.Tag)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
@ -1094,7 +1093,7 @@ func doWindowsInstaller(cmdline []string) {
|
||||||
if env.Commit != "" {
|
if env.Commit != "" {
|
||||||
ver[2] += "-" + env.Commit[:8]
|
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 {
|
if err != nil {
|
||||||
log.Fatalf("Failed to convert installer file path: %v", err)
|
log.Fatalf("Failed to convert installer file path: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ func WithCommit(gitCommit, gitDate string) string {
|
||||||
// Archive holds the textual version string used for Geth archives. e.g.
|
// 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
|
// "1.8.11-dea1ce05" for stable releases, or "1.8.13-unstable-21c059b6" for unstable
|
||||||
// releases.
|
// releases.
|
||||||
func Archive(gitCommit string) string {
|
func Archive(tag, gitCommit string) string {
|
||||||
vsn := Semantic
|
vsn := tag
|
||||||
if version.Meta != "stable" {
|
if version.Meta != "stable" {
|
||||||
vsn += "-" + version.Meta
|
vsn += "-" + version.Meta
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue