From 0b602e69618e1343bc117c5a2688335585ed2ab5 Mon Sep 17 00:00:00 2001 From: Really Him Date: Wed, 21 Jan 2026 13:16:17 -0500 Subject: [PATCH] ci: run release-please after CI on main --- .github/workflows/ci.yml | 8 ++------ .github/workflows/release-please.yml | 7 ++++++- MAINTAINERS.md | 2 +- package.json | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fccf3f8..e1f1749 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,5 @@ jobs: cache: npm - name: Install run: npm ci - - name: Lint - run: npm run lint - - name: Format - run: npm run format - - name: Test - run: npm test + - name: CI + run: npm run ci diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 9b089d8..b8bc165 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,7 +1,11 @@ name: Release Please on: - push: + workflow_run: + workflows: + - CI + types: + - completed branches: - main workflow_dispatch: @@ -12,6 +16,7 @@ permissions: jobs: release-please: + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - name: Run Release Please diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 6bb8d93..676de4d 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -5,7 +5,7 @@ This file documents the release workflow for this repository. ## Release automation (Release Please) - Workflow: `.github/workflows/release-please.yml` -- Trigger: pushes to `main` (or manual run via `workflow_dispatch`) +- Trigger: successful `CI` workflow run on `main` (or manual run via `workflow_dispatch`) - Behavior: opens or updates a release PR and manages `CHANGELOG.md` - Merge: merging the release PR creates the Git tag and GitHub Release diff --git a/package.json b/package.json index 7a1c79b..3616751 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "type": "commonjs", "scripts": { "bundle": "rimraf dist && ncc build src/pre.js -o dist/pre && ncc build src/post.js -o dist/post && ncc build src/noop.js -o dist/noop", + "ci": "npm run lint && npm run format && npm test", "lint": "eslint .", "format": "prettier --check .", "format:write": "prettier --write .",