From 063eb32bd5746bab587e012114888439e8157ee2 Mon Sep 17 00:00:00 2001 From: Joshua Ong Date: Thu, 24 Sep 2026 22:19:17 +0100 Subject: [PATCH] ci: revert package.json and explicitly call release-it without arguments --- .github/workflows/release.yml | 13 ++----------- CONTRIBUTING.md | 9 +++++---- package.json | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ba7029..eb3d455 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,16 +2,6 @@ name: Release on: workflow_dispatch: - inputs: - type: - description: 'Release Type' - required: true - default: 'patch' - type: choice - options: - - major - - minor - - patch jobs: release: @@ -32,7 +22,8 @@ jobs: git config user.email "<>" - name: Release - run: yarn release ${{ inputs.type }} + # We are following a prepare & perform process where you manually bump the version prior to releasing. + run: yarn release-it --no-increment --no-git.commit --no-git.push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57c2cd8..fcd639f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,11 +112,12 @@ Our pre-commit hooks verify that the linter and tests pass when committing. We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc. -To publish new versions, run the following: +> [!NOTE] +> `release-it` was integrated previously when branch-protection rules weren't in place (or were circumvented). As a quick way around that, we manually version now but still use `release-it` for publishing. This means we don't fully leverage `release-it` anymore and thus it may be suitable for replacement (e.g. `release-please`) -```sh -yarn release -``` +To publish new versions, first raise a release PR that bumps the `package.json` version. + +When that is merged to main, trigger the `release` GitHub Actions workflow. ### Scripts diff --git a/package.json b/package.json index c211049..f72427c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\"", "prepack": "bob build", - "release": "release-it --no-increment", + "release": "release-it", "example": "yarn --cwd example", "example-new-architecture": "yarn --cwd example-new-architecture", "bootstrap": "yarn example && yarn example-new-architecture && yarn install && yarn example bundle && yarn example pods && yarn example-new-architecture bundle && yarn example-new-architecture pods",