From 680d4f798dee285869da7c40fc3167dc460142e7 Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Mon, 20 Apr 2026 18:39:38 -0600 Subject: [PATCH 1/3] fix: remove lerna version from release workflow lerna version pushes a commit to main which fails due to branch protection rules. Version bumps should happen in PRs instead, and lerna publish from-package will publish any new versions on merge. Made-with: Cursor --- .github/workflows/release.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d64feba6..f7d5f622 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,9 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-node@v4 with: @@ -28,14 +25,6 @@ jobs: - run: yarn - - name: Configure git - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Version packages - run: npx lerna version patch --yes --force-publish=* - - name: Publish to npm run: yarn lerna:publish From fe00a10e011b76891e82ee5ddcf8e7edfc470a2c Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Mon, 20 Apr 2026 18:40:06 -0600 Subject: [PATCH 2/3] fix: run typecheck and tests before publishing Add a test job (typecheck + unit tests) that must pass before the release job runs. Prevents broken code from being published to npm. Made-with: Cursor --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7d5f622..071e5207 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,25 @@ on: - "*.*" jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "18.x" + + - run: yarn + + - name: Typecheck + run: yarn types + + - name: Test + run: yarn test + release: + needs: test env: COURIER_WS_URL: ${{ secrets.COURIER_WS_URL }} NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From 75587878ef095614cab6a579cb6ccbeeefa10828 Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Mon, 20 Apr 2026 18:41:42 -0600 Subject: [PATCH 3/3] chore: consolidate into single release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge test, staging, and release into one workflow. On push to main: 1. test — typecheck + unit tests 2. staging — build and deploy staging components to S3 (after tests) 3. release — publish to npm and deploy production components (after tests) Remove separate staging.yml since it's now part of release.yml. Made-with: Cursor --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++-- .github/workflows/staging.yml | 34 ---------------------------------- 2 files changed, 27 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/staging.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 071e5207..f3693558 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,12 +25,37 @@ jobs: - name: Test run: yarn test + staging: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "18.x" + + - run: yarn + + - name: Build staging components + run: yarn build:components + env: + IS_STAGING: true + + - uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks --cache-control "max-age=31536000,public,immutable" + env: + AWS_S3_BUCKET: "courier-push-provider-prod-couriercomponentsbucket-jqacxmhbzmwx" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + SOURCE_DIR: "./packages/components/dist" + release: needs: test + runs-on: ubuntu-latest env: - COURIER_WS_URL: ${{ secrets.COURIER_WS_URL }} NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml deleted file mode 100644 index 37bf85b2..00000000 --- a/.github/workflows/staging.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Staging - -on: - push: - branches: - - main - tags-ignore: - - "*.*" - -jobs: - staging-components: - env: - COURIER_WS_URL: ${{ secrets.COURIER_WS_URL }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - registry-url: "https://registry.npmjs.org" - node-version: "18.x" - scope: "@trycourier" - always-auth: true - - run: yarn - - run: yarn build:components - env: - IS_STAGING: true - - uses: jakejarvis/s3-sync-action@master - with: - args: --follow-symlinks --cache-control "max-age=31536000,public,immutable" - env: - AWS_S3_BUCKET: "courier-push-provider-prod-couriercomponentsbucket-jqacxmhbzmwx" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - SOURCE_DIR: "./packages/components/dist"