mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
fix(CI): Use correct download links (#17)
This commit is contained in:
parent
1e7463308d
commit
daf8ac4eeb
2 changed files with 19 additions and 24 deletions
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
|
|
@ -4,24 +4,16 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
- "fix-ci-3" # TODO: remove this
|
|
||||||
tags:
|
tags:
|
||||||
- "v1.*"
|
- "v1.*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Job to extract version
|
|
||||||
extract-version:
|
extract-version:
|
||||||
name: Extract Version
|
name: Extract Version
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
run: |
|
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
|
||||||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
|
||||||
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
# For branch builds, use a test version
|
|
||||||
echo "VERSION=v1.test-branch" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
id: extract_version
|
id: extract_version
|
||||||
outputs:
|
outputs:
|
||||||
VERSION: ${{ steps.extract_version.outputs.VERSION }}
|
VERSION: ${{ steps.extract_version.outputs.VERSION }}
|
||||||
|
|
@ -133,6 +125,7 @@ jobs:
|
||||||
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
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ needs.extract-version.outputs.VERSION }}
|
VERSION: ${{ needs.extract-version.outputs.VERSION }}
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -141,6 +134,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # This is necessary for generating the changelog
|
fetch-depth: 0 # This is necessary for generating the changelog
|
||||||
|
fetch-tags: true # Ensure tags are fetched
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|
@ -185,18 +179,14 @@ jobs:
|
||||||
echo " Alltools AMD64: ${GETH_ALLTOOLS_AMD64:-NOT FOUND}"
|
echo " Alltools AMD64: ${GETH_ALLTOOLS_AMD64:-NOT FOUND}"
|
||||||
echo " Alltools ARM64: ${GETH_ALLTOOLS_ARM64:-NOT FOUND}"
|
echo " Alltools ARM64: ${GETH_ALLTOOLS_ARM64:-NOT FOUND}"
|
||||||
|
|
||||||
# Determine the release tag
|
# For tag builds, use the actual tag
|
||||||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
RELEASE_TAG="${{ env.VERSION }}"
|
||||||
# For tags, use the actual tag
|
|
||||||
RELEASE_TAG="${{ env.VERSION }}"
|
|
||||||
IS_PRERELEASE=""
|
|
||||||
else
|
|
||||||
# For branches, create a specific tag based on commit
|
|
||||||
RELEASE_TAG="test-${GITHUB_SHA::8}"
|
|
||||||
IS_PRERELEASE="--prerelease"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Release tag: $RELEASE_TAG"
|
echo "Release tag: $RELEASE_TAG"
|
||||||
|
echo "GitHub ref: ${{ github.ref }}"
|
||||||
|
echo "GitHub SHA: ${{ github.sha }}"
|
||||||
|
|
||||||
|
# The tag should already exist since it triggered this workflow
|
||||||
|
# We just need to ensure gh release uses it correctly
|
||||||
|
|
||||||
body=$(cat <<- 'ENDBODY'
|
body=$(cat <<- 'ENDBODY'
|
||||||

|

|
||||||
|
|
@ -265,5 +255,11 @@ jobs:
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create the release with the determined tag
|
# Create the release with the actual tag
|
||||||
echo "$body" | gh release create $IS_PRERELEASE --draft -t "Bera Geth $RELEASE_TAG" -F "-" "$RELEASE_TAG" "${assets[@]}"
|
# Using --target with GITHUB_SHA ensures we create the release at the right commit
|
||||||
|
echo "$body" | gh release create "$RELEASE_TAG" \
|
||||||
|
--draft \
|
||||||
|
--target "${{ github.sha }}" \
|
||||||
|
--title "Bera-Geth $RELEASE_TAG" \
|
||||||
|
-F - \
|
||||||
|
"${assets[@]}"
|
||||||
|
|
|
||||||
|
|
@ -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 this.
|
if env.Branch != "main" && !strings.HasPrefix(env.Tag, "v1.") {
|
||||||
if env.Branch != "main" && env.Branch != "fix-ci-3" && !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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue