diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3f78c5..6e41cb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,9 @@ jobs: # instead of using the local cache in .yarn folder, since it's in .gitignore cache: 'yarn' + - name: Replace branch name in branches array + run: sed -i 's|'current-branch'|'${{ github.ref_name }}'|' .releaserc.yaml + # Use this GitHub Action - name: Check package version uses: technote-space/package-version-check-action@v1 diff --git a/.releaserc b/.releaserc index 51f77d5..f8ceeaf 100644 --- a/.releaserc +++ b/.releaserc @@ -1,9 +1,28 @@ { "branches": [ - "master" + "master", + "current-branch" ], "plugins": [ - "@semantic-release/commit-analyzer", + [ + "@semantic-release/commit-analyzer", + { + "releaseRules": [ + { "type": "docs", "scope": "README", "release": "patch" }, + { "type": "refactor", "release": "patch" }, + { "type": "style", "release": "patch" }, + { "type": "ci", "release": "patch" }, + { "type": "test", "release": "patch" }, + { "type": "chore", "release": "patch" }, + { "type": "perf", "release": "patch" }, + { "type": "build", "release": "patch" }, + { "type": "revert", "release": "patch" }, + { "type": "fix", "release": "patch" }, + { "type": "feat", "release": "minor" }, + { "type": "BREAKING CHANGE", "release": "major" } + ] + } + ], "@semantic-release/release-notes-generator", [ "@semantic-release/changelog",