@@ -43,28 +43,56 @@ jobs:
4343 outputs :
4444 VERSION : ${{ steps.extract_version.outputs.VERSION }}
4545
46+ check-version :
47+ name : check version
48+ runs-on : ubuntu-latest
49+ needs : extract-version
50+ if : ${{ github.event.inputs.dry_run != 'true' }}
51+ steps :
52+ - uses : actions/checkout@v4
53+ - uses : dtolnay/rust-toolchain@stable
54+ - name : Verify crate version matches tag
55+ # Check that the Cargo version starts with the tag,
56+ # so that Cargo version 1.4.8 can be matched against both v1.4.8 and v1.4.8-rc.1
57+ run : |
58+ tag="${{ needs.extract-version.outputs.VERSION }}"
59+ tag=${tag#v}
60+ cargo_ver=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
61+ [[ "$tag" == "$cargo_ver"* ]] || { echo "Tag $tag doesn’t match the Cargo version $cargo_ver"; exit 1; }
62+
4663 build :
4764 name : build release
4865 runs-on : ${{ matrix.configs.os }}
4966 needs : extract-version
67+ continue-on-error : ${{ matrix.configs.allow_fail }}
5068 strategy :
69+ fail-fast : true
5170 matrix :
5271 configs :
5372 - target : x86_64-unknown-linux-gnu
5473 os : ubuntu-24.04
5574 profile : maxperf
75+ allow_fail : false
5676 - target : aarch64-unknown-linux-gnu
5777 os : ubuntu-24.04
5878 profile : maxperf
79+ allow_fail : false
5980 - target : x86_64-apple-darwin
6081 os : macos-13
6182 profile : maxperf
83+ allow_fail : false
6284 - target : aarch64-apple-darwin
6385 os : macos-14
6486 profile : maxperf
87+ allow_fail : false
6588 - target : x86_64-pc-windows-gnu
6689 os : ubuntu-24.04
6790 profile : maxperf
91+ allow_fail : false
92+ - target : riscv64gc-unknown-linux-gnu
93+ os : ubuntu-24.04
94+ profile : maxperf
95+ allow_fail : true
6896 build :
6997 - command : build
7098 binary : reth
@@ -127,8 +155,8 @@ jobs:
127155
128156 draft-release :
129157 name : draft release
130- needs : [build, extract-version]
131158 runs-on : ubuntu-latest
159+ needs : [build, extract-version]
132160 if : ${{ github.event.inputs.dry_run != 'true' }}
133161 env :
134162 VERSION : ${{ needs.extract-version.outputs.VERSION }}
@@ -143,13 +171,24 @@ jobs:
143171 fetch-depth : 0
144172 - name : Download artifacts
145173 uses : actions/download-artifact@v4
174+ - name : Generate full changelog
175+ id : changelog
176+ run : |
177+ echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
178+ echo "$(git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 ${{ env.VERSION }}^)..${{ env.VERSION }})" >> $GITHUB_OUTPUT
179+ echo "EOF" >> $GITHUB_OUTPUT
146180 - name : Create release draft
147181 env :
148182 GITHUB_USER : ${{ github.repository_owner }}
149183 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
150184 # The formatting here is borrowed from Lighthouse (which is borrowed from OpenEthereum):
151185 # https://github.com/openethereum/openethereum/blob/6c2d392d867b058ff867c4373e40850ca3f96969/.github/workflows/build.yml
152186 run : |
187+ prerelease_flag=""
188+ if [[ "${GITHUB_REF}" == *-rc* ]]; then
189+ prerelease_flag="--prerelease"
190+ fi
191+
153192 body=$(cat <<- "ENDBODY"
154193 
155194
@@ -186,6 +225,10 @@ jobs:
186225
187226 *See [Update Priorities](https://paradigmxyz.github.io/reth/installation/priorities.html) for more information about this table.*
188227
228+ ## All Changes
229+
230+ ${{ steps.changelog.outputs.CHANGELOG }}
231+
189232 ## Binaries
190233
191234 [See pre-built binaries documentation.](https://paradigmxyz.github.io/reth/installation/binaries.html)
@@ -220,12 +263,12 @@ jobs:
220263 assets+=("$asset/$asset")
221264 done
222265 tag_name="${{ env.VERSION }}"
223- echo "$body" | gh release create --draft -t "Reth $tag_name" -F "-" "$tag_name" "${assets[@]}"
266+ echo "$body" | gh release create --draft $prerelease_flag -t "Reth $tag_name" -F "-" "$tag_name" "${assets[@]}"
224267
225268 dry-run-summary :
226269 name : dry run summary
227- needs : [build, extract-version]
228270 runs-on : ubuntu-latest
271+ needs : [build, extract-version]
229272 if : ${{ github.event.inputs.dry_run == 'true' }}
230273 env :
231274 VERSION : ${{ needs.extract-version.outputs.VERSION }}
@@ -242,4 +285,4 @@ jobs:
242285 echo "- A draft release would be created"
243286 echo ""
244287 echo "### Next Steps"
245- echo "To perform a real release, push a git tag."
288+ echo "To perform a real release, push a git tag."
0 commit comments