From a648dbfffc09cbfa2b31dcdd230dc832f07e779d Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Wed, 6 Mar 2024 14:40:22 +0100 Subject: [PATCH 1/6] Don't run the release workflow on pull requests The "Check commit" job fails in pull requests from external users. The easiest fix is to just not run it in pull requests. Since this workflow is about publishing, it makes sense to only run it in `main` (and `edr/release`, for special cases). The downside is that the sanity checks that are performed at the beginning won't run in pull requests, but this seems like an acceptable trade-off for now. --- .github/workflows/edr-npm-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/edr-npm-release.yml b/.github/workflows/edr-npm-release.yml index 4cdb48ac61..cdd09851e3 100644 --- a/.github/workflows/edr-npm-release.yml +++ b/.github/workflows/edr-npm-release.yml @@ -20,7 +20,6 @@ on: - "**/*.gitignore" - .editorconfig - docs/** - pull_request: null workflow_dispatch: jobs: From 0d8471f632c9c07c242e950868b8ce67ca7cf96c Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Wed, 6 Mar 2024 14:43:12 +0100 Subject: [PATCH 2/6] Allow publishing EDR from the edr/release branch Useful when we want to publish a pre-release and for any reason we don't want to merge it to main. --- .github/workflows/edr-npm-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/edr-npm-release.yml b/.github/workflows/edr-npm-release.yml index cdd09851e3..f9af24de8c 100644 --- a/.github/workflows/edr-npm-release.yml +++ b/.github/workflows/edr-npm-release.yml @@ -390,7 +390,7 @@ jobs: - test-linux-aarch64-gnu-binding - test-linux-aarch64-musl-binding # Only run workflow if the PR is merged to main and the commit message is a release commit. - if: ${{ needs.check_commit.outputs.match == 'true' && github.ref == 'refs/heads/main' }} + if: ${{ needs.check_commit.outputs.match == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/edr/release') }} defaults: run: working-directory: ./crates/edr_napi From a3e0c06c256e27201167422d7429495078292021 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Wed, 6 Mar 2024 14:45:20 +0100 Subject: [PATCH 3/6] Run recent mainnet block workflow every 8 hours --- .github/workflows/test-recent-mainnet-block.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-recent-mainnet-block.yml b/.github/workflows/test-recent-mainnet-block.yml index 9edc832943..31ccf18410 100644 --- a/.github/workflows/test-recent-mainnet-block.yml +++ b/.github/workflows/test-recent-mainnet-block.yml @@ -2,7 +2,7 @@ name: Run a recent full block in the Hardhat Network on: schedule: - - cron: "0 0 * * *" + - cron: "0 */8 * * *" workflow_dispatch: defaults: From 992d5b5caeafae54ed2f4bdf85034dc256d02a14 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Wed, 6 Mar 2024 14:48:35 +0100 Subject: [PATCH 4/6] Make pre-release workflow work with EDR --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index c06a8f998a..02717b9e25 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -76,4 +76,4 @@ jobs: NODE_OPTIONS: "--max-old-space-size=4096" run: | pnpm build - pnpm test:forking + pnpm test:except-tracing From a1a425820920e9136a208ae150f5879e10d79a38 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Thu, 7 Mar 2024 13:35:25 +0100 Subject: [PATCH 5/6] Don't check commit for external users --- .github/workflows/edr-npm-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/edr-npm-release.yml b/.github/workflows/edr-npm-release.yml index f9af24de8c..1972441dcf 100644 --- a/.github/workflows/edr-npm-release.yml +++ b/.github/workflows/edr-npm-release.yml @@ -359,6 +359,7 @@ jobs: check_commit: name: Check commit runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.author_association == 'OWNER' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR' steps: - uses: actions/checkout@v4 with: From 774310234e6120546aea57c957b7e16edd94d767 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Thu, 7 Mar 2024 13:37:32 +0100 Subject: [PATCH 6/6] Run edr release workflow in PRs again --- .github/workflows/edr-npm-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/edr-npm-release.yml b/.github/workflows/edr-npm-release.yml index 1972441dcf..becd924699 100644 --- a/.github/workflows/edr-npm-release.yml +++ b/.github/workflows/edr-npm-release.yml @@ -20,6 +20,7 @@ on: - "**/*.gitignore" - .editorconfig - docs/** + pull_request: null workflow_dispatch: jobs: