diff --git a/.github/workflows/sf-draft-release.yml b/.github/workflows/sf-draft-release.yml new file mode 100644 index 00000000000..e97505386d6 --- /dev/null +++ b/.github/workflows/sf-draft-release.yml @@ -0,0 +1,37 @@ +name: Draft release + +on: + pull_request: + branches: + - "release/*" + paths: + - "CHANGELOG.md" + +permissions: + contents: write + pull-requests: write + +concurrency: + group: draft-release-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + draft-release: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Detect release PR + id: detect + uses: streamingfast/actions/sfreleaser/detect@v1 + + - name: Prepare release + if: steps.detect.outputs.is_release_pr + uses: streamingfast/actions/sfreleaser/prepare@v1 + with: + version: ${{ steps.detect.outputs.version }} diff --git a/.github/workflows/sf-publish-release.yml b/.github/workflows/sf-publish-release.yml new file mode 100644 index 00000000000..e3f911aaf08 --- /dev/null +++ b/.github/workflows/sf-publish-release.yml @@ -0,0 +1,42 @@ +name: Publish release + +on: + pull_request: + types: + - closed + branches: + - "release/*" + paths: + - "CHANGELOG.md" + +permissions: + actions: write + contents: write + +concurrency: + group: publish-release-${{ github.event.pull_request.number }} + cancel-in-progress: false + +jobs: + publish: + if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} + fetch-depth: 0 + + - name: Detect release PR + id: detect + uses: streamingfast/actions/sfreleaser/detect@v1 + with: + before: ${{ github.event.pull_request.merge_commit_sha }}^1 + + - name: Publish release + if: steps.detect.outputs.is_release_pr + uses: streamingfast/actions/sfreleaser/publish@v1 + with: + version: ${{ steps.detect.outputs.version }} + build-workflow: sf-release.yml diff --git a/.github/workflows/sf-release-preview.yml b/.github/workflows/sf-release-preview.yml deleted file mode 100644 index e9820451c1f..00000000000 --- a/.github/workflows/sf-release-preview.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Release preview - -on: - pull_request: - branches: - - "release/*" - paths: - - "CHANGELOG.md" - -permissions: - contents: read - pull-requests: write - -concurrency: - group: sf-release-preview-${{ github.event.pull_request.number }} - cancel-in-progress: true - -env: - SFRELEASER_VERSION: "v0.17.1-rc.8" - -jobs: - preview: - if: github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-24.04 - defaults: - run: - shell: bash - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Install sfreleaser - run: | - curl -sSfL "https://github.com/streamingfast/sfreleaser/releases/download/$SFRELEASER_VERSION/sfreleaser_linux_x86_64.tar.gz" | tar -xz -C "$RUNNER_TEMP" sfreleaser - echo "$RUNNER_TEMP" >> "$GITHUB_PATH" - - - name: Detect version - id: detect - run: sfreleaser release detect - - - name: Prepare release - if: steps.detect.outputs.is_release_pr - env: - VERSION: ${{ steps.detect.outputs.version }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: sfreleaser release prepare "$VERSION" --yes diff --git a/.github/workflows/sf-release-tag.yml b/.github/workflows/sf-release-tag.yml deleted file mode 100644 index 1b7f0fb2536..00000000000 --- a/.github/workflows/sf-release-tag.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release tag - -on: - pull_request: - types: - - closed - branches: - - "release/*" - paths: - - "CHANGELOG.md" - -permissions: - actions: write - contents: write - -concurrency: - group: sf-release-tag-${{ github.event.pull_request.number }} - cancel-in-progress: false - -env: - SFRELEASER_VERSION: "v0.17.1-rc.8" - -jobs: - tag: - if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-24.04 - defaults: - run: - shell: bash - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.merge_commit_sha }} - fetch-depth: 0 - - - name: Install sfreleaser - run: | - curl -sSfL "https://github.com/streamingfast/sfreleaser/releases/download/$SFRELEASER_VERSION/sfreleaser_linux_x86_64.tar.gz" | tar -xz -C "$RUNNER_TEMP" sfreleaser - echo "$RUNNER_TEMP" >> "$GITHUB_PATH" - - - name: Detect version - id: detect - run: sfreleaser release detect --before "${{ github.event.pull_request.merge_commit_sha }}^1" - - - name: Create tag on the merge commit - if: steps.detect.outputs.is_release_pr - env: - VERSION: ${{ steps.detect.outputs.version }} - COMMIT: ${{ github.event.pull_request.merge_commit_sha }} - run: git push origin "$COMMIT:refs/tags/$VERSION" - - # A tag pushed with GITHUB_TOKEN triggers no workflow, so the release branch (the default one) starts sf-release.yml on it. - - name: Start sf-release.yml on the tag - if: steps.detect.outputs.is_release_pr && github.base_ref == github.event.repository.default_branch - env: - GH_TOKEN: ${{ github.token }} - VERSION: ${{ steps.detect.outputs.version }} - run: gh workflow run sf-release.yml --repo "$GITHUB_REPOSITORY" --ref "$VERSION" diff --git a/.github/workflows/sf-release.yml b/.github/workflows/sf-release.yml index d09eed0b45c..ce4834cea7c 100644 --- a/.github/workflows/sf-release.yml +++ b/.github/workflows/sf-release.yml @@ -210,20 +210,9 @@ jobs: # silences the buildx warning. docker cp $(docker create --platform=linux/amd64 ${{ steps.image.outputs.ID }}):/usr/local/bin/reth ./reth_linux_amd64 - - name: Extract Changelog - id: changelog - run: | - curl -L https://github.com/streamingfast/sfreleaser/releases/download/v0.12.1/sfreleaser_linux_x86_64.tar.gz | tar -xz - chmod +x sfreleaser - - ./sfreleaser changelog extract-section \ - github://token:${{ github.token }}@${{ github.repository }}/$GITHUB_SHA/CHANGELOG.md \ - --github-output="changelog:$GITHUB_OUTPUT" - - name: Release uses: softprops/action-gh-release@v2 with: - body: ${{ steps.changelog.outputs.changelog }} prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'alpha') }} files: | ./reth_linux_amd64 diff --git a/.gitignore b/.gitignore index 4a44168e7c9..56e0ba8a3fb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # will have compiled files and executables ./debug/ target/ +/build/ # These are backup files generated by rustfmt **/*.rs.bk diff --git a/.sfreleaser b/.sfreleaser index e15a5b172ab..8dc4b8ad951 100644 --- a/.sfreleaser +++ b/.sfreleaser @@ -1,3 +1,3 @@ global: language: rust - variant: library + variant: application diff --git a/CHANGELOG.md b/CHANGELOG.md index 93715e864d2..0d584c3ac1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ This changelog covers Firehose-specific changes only. For upstream reth changes, The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## reth-v2.9.0-fh3.1-not-a-real-version-alpha.2 + +Tests the release made by sfreleaser, no Firehose changes. + ## reth-v2.11.0-fh3.1 ### Changed