From e7f0a04e389350e716563a97c81dd32687ce1dc4 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Fri, 10 Oct 2025 10:02:30 -0500 Subject: [PATCH 1/2] chore: setup a node-reth release job --- .github/workflows/release.yml | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2bf9820 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,69 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version_bump: + description: 'Version bump type' + required: true + default: 'patch' + type: choice + options: + - patch + - minor + - major + +env: + CARGO_TERM_COLOR: always + +jobs: + release: + name: Create Release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 + with: + egress-policy: audit + + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable + + - name: Install cargo-edit + run: cargo install cargo-edit + + - name: Bump version + run: | + cargo set-version --bump ${{ inputs.version_bump }} + NEW_VERSION=$(grep -m1 '^version = ' Cargo.toml | sed 's/version = "\(.*\)"/\1/') + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + echo "Bumped version to: $NEW_VERSION" + + - name: Build project + run: cargo build --all-targets + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Commit and push changes + run: | + git add Cargo.toml Cargo.lock + git commit -m "chore: bump version to ${{ env.NEW_VERSION }}" + git tag -a "v${{ env.NEW_VERSION }}" -m "Release v${{ env.NEW_VERSION }}" + git push origin main + git push origin "v${{ env.NEW_VERSION }}" + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "v${{ env.NEW_VERSION }}" \ + --title "v${{ env.NEW_VERSION }}" \ + --generate-notes From 339b74a13ed79874366c26f8ccdb95c28c3e0d68 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Fri, 10 Oct 2025 10:08:11 -0500 Subject: [PATCH 2/2] set release to draft --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bf9820..bf3d77f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,4 +66,5 @@ jobs: run: | gh release create "v${{ env.NEW_VERSION }}" \ --title "v${{ env.NEW_VERSION }}" \ - --generate-notes + --generate-notes \ + --draft