diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 687a8fe..3afed70 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -14,8 +14,6 @@ jobs: issues: write pull-requests: write - if: github.repository == 'BunnyWay/es-empty-script' - name: Release runs-on: ubuntu-latest steps: diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index e5f14ce..4b9f08a 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -1,14 +1,22 @@ name: On merge changeset on: - pull_request: - types: [closed] + # To enable the Changeset pattern, you'll need to uncomment those line so each + # time a Pull Request is closed you run this action. + # pull_request: + # types: [closed] + # branches: + # - 'main' + # Every push on main are going to run this action. + push: branches: - 'main' jobs: publish: - if: contains(github.event.pull_request.head.ref, 'changeset-release') + # To ensure you only run this action when closing a Release PR, you should + # uncomment this + # if: contains(github.event.pull_request.head.ref, 'changeset-release') name: 'Upload script' runs-on: ubuntu-latest diff --git a/README.md b/README.md index a3c1cb2..9b9514b 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,32 @@ We also use `pnpm` to use `changeset`. ## Changeset -In this template, we handle versionning with [changeset](https://github.com/changesets/changesets), -each time you do a change, you'll need to indicate the kind of changes you are -doing so we can have the auto-release process ongoing by doing: +This template uses [changeset](https://github.com/changesets/changesets) for +version management. Changeset helps track and document changes in your project, +making it easier to manage releases and generate changelogs. -``` -pnpm changeset -``` +When you make changes to the project, you should create a changeset to describe +those changes: + +1. Run the following command: + ``` + pnpm changeset + ``` +2. Follow the prompts to select the type of change (major, minor, or patch) and provide a brief description. +3. Commit the generated changeset file along with your code changes. + +This process ensures that all modifications are properly documented and +versioned, facilitating smoother releases and better communication about +project updates. + +When you merge a pull request that includes a changeset, it will automatically +create an associated pull request to release your changes. + +This new pull request will trigger the release process of the script to your +PullZone in Bunny. + + +> This behavior is disabled by default, every pushes on main are now pushed to +> Bunny directly. +> You can enable this pattern again by updating this +> [action](./.github/workflows/on-merge.yml)